Skip Menu |

This queue is for tickets about the Test-LoadAllModules CPAN distribution.

Report information
The Basics
Id: 75608
Status: resolved
Priority: 0/
Queue: Test-LoadAllModules

People
Owner: Nobody in particular
Requestors: CHORNY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.021
Fixed in: (no value)



Subject: fails on Windows
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. -- Alexandr Ciornii, http://chorny.net
Subject: [PATCH] fails on Windows
RT-Send-CC: garfieldnate [...] gmail.com
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. >
Thank you for repoting the bug. I fixed this and released version 0.022.