Technicalities aside - are you sure you really want to check this? I can't imagine a scenario where this would be a good thing to do.use Devel::Sub::Which qw/:universal/; INIT { # after all modules have been loaded. Will break with mod_perl my $which = __PACKAGE__->which("foo"); ( my $class = $which ) =~ s/::[^:]+$//; die "Subclassing 'foo' is not allowed" unless $class eq __PACKAGE_ +_; }
In reply to Re: checking a method is not subclassed
by nothingmuch
in thread checking a method is not subclassed
by water
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |