Your "is" methods return different values in list context and in scalar context. I recommend changing return; to return 0;.
I was going to recommend the following solution, but the message thrown by Carp might not refer to the right line. Using <tt class='inlinecode'>caller</tt> directly to build the message would work better.
sub AUTOLOAD { my ($pkg, $meth) = our $AUTOLOAD =~ /(.*)::(.*)/; if ( $meth =~ /^is_/ ) { return 0; } require Carp; Carp::croak(qq{Can't locate object method "$meth" via package "$pk +g"}); }
In reply to Re: Redispatching AUTOLOAD for failure
by ikegami
in thread Redispatching AUTOLOAD for failure
by dragonchild
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |