On 2016-01-29 04:39:52, GRUBERT wrote:
Show quoted text> Module-Pluggable-5.2 Test fails:
>
> t/10innerpack_super.t ........ 1/3
> # Failed test 'Still pick up other inner package'
> # at t/10innerpack_super.t line 8.
> # Structures begin differing at:
> # $got->[0] = 'Foo::Driver'
> # $expected->[0] = 'Foo::Bar'
> # Looks like you failed 1 test of 3.
>
> On perl 5.22.
>
I guess you have a "Foo.pm" in your perl installation. At least I can reproduce this error if I create a Foo.pm with the following contents:
package Foo;
sub whee {}
package Foo::Driver;
sub whee {}
1;
__END__
Problem is that "use base" has to guess if a package is already loaded or not (I think it does this by checking for the existence of $VERSION in the package). Here this heuristics fails, and Foo.pm (a wrong one) is loaded.
This can be workarounded by using 'use parent -norequire => "Foo"' instead.
See
https://github.com/PerlDancer/Dancer/issues/1127 for a similar case.