I believe the problem is thus:
Test::LoadAllModules uses Module::Pluggable::Object uses File::Find uses Cwd uses Win32 (dynamically at run time), and Win32 has an XS component. While loading the modules in this test, @INC only has t/lib2, so it can't find Win32.dll when Cwd tries to load Win32.
The solution is to load Win32 ahead of time, while all of the libraries are still available. Place this line in the file (anywhere before the all_uses_ok) and the test will pass:
if ($^O =~ m/win32/) {use Win32 }
On Wed Mar 07 14:47:46 2012, CHORNY wrote:
Show quoted text> t/03_lib.t ...... Can't locate Win32.pm in @INC (@INC contains: t\lib2)
> at C:/strawberry514/perl/lib/Cwd.pm line 758.
> BEGIN failed--compilation aborted at t/03_lib.t line 9.
> BEGIN failed--compilation aborted at t/03_lib.t line 9.
> t/03_lib.t ...... Dubious, test returned 2 (wstat 512, 0x200)
> No subtests run
>
>
> Win32.pm is a core module.
>