water has asked for the wisdom of the Perl Monks concerning the following question:
The autoload isn't needed -- you can set the options with an explicit $obj->options() method, but the author I guess thought it'd be nice to allow $obj->some_random_option() calls and used AUTOLOAD for this.
Yuck.
And the author's AUTOLOAD doesn't check anything, it just dispatches everything to $obj->option(some_random_option=>blah blah), without checking if some_random_option is supported.
I'm encountering some errors in the module, which I don't fully understand yet, which lead to the objects unexpected demise, which leads to a DESTROY call, which AUTOLOAD happily dispatches to options.
Yuck again.
Is there a way for me, while debugging, to mangle the symbol table to remove Foo::Bar::Baz::AUTOLOAD subroutine?
I do not / can not modify Foo/Bar/Baz.pm.
Thanks!
PS I think I recall in Damian's PBP Dog book, he states AUTOLOADs are bad, and I agree! Too much magick.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: removing someone elses AUTOLOAD
by xdg (Monsignor) on Dec 04, 2005 at 13:48 UTC | |
Re: removing someone elses AUTOLOAD
by Tanktalus (Canon) on Dec 04, 2005 at 15:26 UTC |