dmitri has asked for the wisdom of the Perl Monks concerning the following question:
I have the following piece of code:
ABC::XYZ->new->$autoloaded;
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Method names with colons in them?
by VSarkiss (Monsignor) on Jul 08, 2005 at 14:48 UTC | |
by runrig (Abbot) on Jul 08, 2005 at 16:29 UTC | |
|
Re: Method names with colons in them?
by artist (Parson) on Jul 08, 2005 at 13:34 UTC | |
|
Re: Method names with colons in them?
by Fletch (Bishop) on Jul 08, 2005 at 14:47 UTC |