This doesn't catch cases where a method is dealt with by an AUTOLOAD function.my @classes = ref $foo; my $method = "do_stuff"; while (@classes) { my $class = shift @classes; no strict 'refs'; if (defined &{"${class}::${method}"}) { say $class; exit; } unshift @classes, @{"${class}::ISA"}; } say "Not found";
In reply to Re: What package is the method in?
by JavaFan
in thread What package is the method in?
by Sixtease
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |