The code in the parent post is neither inheritable nor importable. Fix:
use List::Util qw( first ); sub check { my ($self, $method) = @_; my $class = ref($self) || $self; my $isa = do { no strict 'refs'; \@{$class.'::ISA'} }; return first { $_->can($method) } @$isa; }
In reply to Re^2: Detecting Overridden Methods
by ikegami
in thread Detecting Overridden Methods
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |