when called as a class method. When you're called as a class method (without an object), the value of $self is no longer a hashref: it's just a string. You'll need to store "class instance" variables instead of "instance" variables. See Damian's excellent book on this.sub baz { my $self = shift; $self->{smiley} += 25; .. }
-- Randal L. Schwartz, Perl hacker
In reply to Re: OOP question
by merlyn
in thread OOP question
by BMaximus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |