xevian has asked for the wisdom of the Perl Monks concerning the following question:
Using the same method if I try to detect if AUTOLOAD is defined, it actually tries to call Test::Pkg::Thing::AUTOLOAD even if it doesn't exist (which of course is a problem and causes the program to exit with an error.)require Test::Pkg::Thing; my $func_name = "Test::Pkg::Thing::do_something"; if( defined &$func_name ) { print "defined!\n"; }
Does any monk have a nugget of wisdom to share?require Test::Pkg::Thing; my $func_name = "Test::Pkg::Thing::AUTOLOAD"; if( defined &$func_name ) # not what I expect { print "defined!\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Does AUTOLOAD exist?
by rinceWind (Monsignor) on Oct 12, 2005 at 16:01 UTC | |
|
Re: Does AUTOLOAD exist?
by Perl Mouse (Chaplain) on Oct 12, 2005 at 15:41 UTC | |
by xevian (Sexton) on Oct 12, 2005 at 15:59 UTC |