The stupid question is the question not asked | |
PerlMonks |
Re: Invoking method in another packageby Dog and Pony (Priest) |
on Sep 30, 2002 at 09:17 UTC ( [id://201656]=note: print w/replies, xml ) | Need Help?? |
It is essentially equal to:
Changing the call to that, and changing the name of the variable $self to something like $object won't change anything, but will make the code more readable, as well as making your intent more clear. To me it seems you want a class method (as opposed to object method), or call it a function, that gets some information out of an object. Does it need to be a real object at all? A hashref would give the same result if you don't need more stuff (like methods) inside Foobar. You have moved into a dark place. It is pitch black. You are likely to be eaten by a grue.
In Section
Seekers of Perl Wisdom
|
|