X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=lib%2FOnis%2FData%2FPersistent%2FNone.pm;h=c8b77fd2ae3f88d7e00bba75b852e6cccae30d6b;hb=119c9ff55d96a87f2b0a1cd66460c53c50cb8127;hp=919fb5a7195138b99d032b908c74b43b5dbe5ed3;hpb=2dfc95bddb9ea3e5c85503b1e6f529c4945cfe30;p=onis.git diff --git a/lib/Onis/Data/Persistent/None.pm b/lib/Onis/Data/Persistent/None.pm index 919fb5a..c8b77fd 100644 --- a/lib/Onis/Data/Persistent/None.pm +++ b/lib/Onis/Data/Persistent/None.pm @@ -2,8 +2,10 @@ package Onis::Data::Persistent::None; use strict; use warnings; +use vars (qw($TREE)); use Carp qw(carp confess); +use Exporter; =head1 NAME @@ -19,7 +21,8 @@ None. =cut -our $Tree = {}; +@Onis::Data::Persistent::None::EXPORT_OK = (qw($TREE)); +@Onis::Data::Persistent::None::ISA = ('Exporter'); if ($::DEBUG & 0x0200) { @@ -40,14 +43,14 @@ sub new my $id = $caller . ':' . $name; - if (exists ($Tree->{$id})) + if (exists ($TREE->{$id})) { print STDERR $/, __FILE__, ": Name $name has been used in context $caller before."; return (undef); } - $Tree->{$id} = {}; - $obj->{'data'} = $Tree->{$id}; + $TREE->{$id} = {}; + $obj->{'data'} = $TREE->{$id}; $obj->{'key'} = $key; $obj->{'fields'} = [@fields];