Subject: | Misfiring check in _maybe_load_module |
A bit contrived, but some of my tests have code (for a good reason), that triggers this behavior:
rabbit@Ahasver:~$ perlbrew use 5.8.5
rabbit@Ahasver:~$ perl -e '
if( "$]" < 5.010 ) {
require Devel::OverrideGlobalRequire;
Devel::OverrideGlobalRequire::override_global_require(sub {
# simple escape "please try again, I am going to adjust things"
eval {
return $_[0]->();
} or do {
delete $INC{$_[1]};
die $@;
};
});
}
require Moo::_Utils;
Moo::_Utils::_maybe_load_module( "Can::Not::Haz" )
for (1,2)
'
Can::Not::Haz exists but failed to load with error: Can't locate Can/Not/Haz.pm in @INC (@INC contains: /home/rabbit/perl5/perlbrew/perls/5.8.5/lib/5.8.5/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.8.5/lib/5.8.5 /home/rabbit/perl5/perlbrew/perls/5.8.5/lib/site_perl/5.8.5/x86_64-linux-thread-multi /home/rabbit/perl5/perlbrew/perls/5.8.5/lib/site_perl/5.8.5 /home/rabbit/perl5/perlbrew/perls/5.8.5/lib/site_perl .) at (eval 124) line 5.