Subject: | bug in Moose exceptions handler while loading parent class |
Hi, there is a bug in Moose exceptions handler while loading parent class.
----------------------------------
file 1.pl
use App;
1;
__END__
----------------------------------
file App.pm
use Moose;
extends qw(App1);
around aaa => sub { };
1;
__END__
----------------------------------
file App1.pm
use Moose;
use Nonexistent::Package; # <--- this package is not exists
sub aaa { }
1;
__END__
I expect the following error message when running 1.pl:
Can't locate Nonexistent/Package.pm in @INC ( ...,
but got:
The method 'aaa' was not found in the inheritance hierarchy for App...
App1.pm has compilation errors due to can't load Nonexistent::Package, but Moose ignore and hide this errors.
If I comment "around aaa => sub { };" in App.pm -> App.pm will be loaded without any exception, which is totally wrong.