Hello.
When writing Class::MOP::Class->get_method_map() in XS, I found that it
is inconsistent.
Geven the following class:
#!perl -w
{
package Base;
sub m1{ 'foo' }
sub m2{ 'bar' }
}
{
package Derived;
use parent -norequire => qw(Base);
sub m1; # stub
sub m2 :method; # stub with an attribute
}
eval{ Derived->m1() } or warn $@;
eval{ Derived->m2() } or warn $@;
__END__
The Perl method dispatch mechanism will find m1() and m2() in Derived
and throw fatal errors like "Undefined subroutine &Derived::m1 called
at...".
Class::MOP::Class->get_method_map(), however, won't find m1() in
Derived, while finding m2() in Derived.
I think it should find m1() in Derived as Perl does.
Regards,
--
Goro Fuji (GFUJI at CPAN.org)