in reply to Redispatching AUTOLOAD for failure
I'd probably avoid autoload, and just assign the subroutine. Based on what I think you're trying to do, I'd probably have an init function in Base that would setup whatever I might need. Obviously, you'd want to assign '$is_func' to handle your method names relative to the package names.
package Base; sub init { my $class = shift; my $is_func = $class.'::is_'.lc($class); no strict 'refs'; *$is_func = sub { return 1 }; } ... package Foo; our @ISA = qw( Base ); __PACKAGE__->init(); ... package Bar; our @ISA = qw( Base ); __PACKAGE__->init();
|
|---|