Do you know where your variables are? | |
PerlMonks |
Method names with colons in them?by dmitri (Priest) |
on Jul 08, 2005 at 13:26 UTC ( [id://473407]=perlquestion: print w/replies, xml ) | Need Help?? |
dmitri has asked for the wisdom of the Perl Monks concerning the following question:
Dear Brethren,
I have the following piece of code:
Obviously, method specified in $autoloaded is handled by AUTOLOAD. This works well if the value of the variable is something like 'abc', but does not work if the value is 'abc::xyz', as this results in the following run-time error: Can't locate object method "xyz" via package "abc::xyz" However, I still want to get AUTOLOAD called even if there are colons in the value of $autoloaded. Is there any way to do it? P.S. I am using 5.6.1. Update Thank you all for your responses! I think I now understand this a bit better.
Back to
Seekers of Perl Wisdom
|
|