I was under the impression that "use strict" would disallow me from using package level variablesThe use of strict merely discourages the use of package variables. As long as a variable exists within the package's symbol table you're free to use it without it being fully qualifying.
If you had a hash as a data member of the blessed object (which itself was a hash) then you would use it like so
If you're a little confused about how how classes and objects work I'd recommend reading Tom Christiansen's oo tutorial and perhaps also read up on references in perl.# assign to hash $self->{hash}->{foo} = 'bar'; # get keys from hash keys %{$self->{hash}}; # tie hash tie %{$self->{hash}}, "AnyDBM_File", "data", O_RDWR, 0644;
_________
broquaint
In reply to Re: Re: Re: Tying with a class method
by broquaint
in thread Tying with a class method
by ninja-joe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |