in reply to Re: current/active package
in thread current/active package
While,sub woot { my ($self) = @_; print __PACKAGE__, "\n"; # <-- prints "foo" print ref($self), "\n"; # <-- prints nothing }
I think this is because, in this simple example, the object was never blessed. Had it been blessed, I think ikegami's answer is correct.sub woot { my ($self) = @_; print __PACKAGE__, "\n"; # <-- prints "foo" print $self, "\n"; # <-- prints "bar" }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: current/active package
by ikegami (Patriarch) on Sep 25, 2009 at 06:06 UTC | |
|
Re^3: current/active package
by rovf (Priest) on Sep 25, 2009 at 07:51 UTC | |
by toddfreed (Novice) on Sep 25, 2009 at 14:10 UTC | |
by ikegami (Patriarch) on Sep 25, 2009 at 15:22 UTC |