Fri Sep 03 10:27:05 2010: Request 61027 was acted upon. Transaction: Ticket created by ROODE Queue: Module-ScanDeps Subject: "use lib" does not work. Broken in: 0.98 Severity: Important Owner: Nobody Requestors: eric.roode.c...@gmail.com Status: new Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=61027 >
When Module::ScanDeps encounters a "use lib" line, it includes the version-specific subdirectory, the architechture-specific subdirectory, and the version-and-architecture-specific subdirectory, but it does not include the directory itself! Here is a small test program: #!/usr/local/bin/perl use lib 'lib'; use MyModule; in a 'lib' directory under the current directory, put MyModule.pm containing: 1; When you run scandeps.pl, it says "No modules found!". If you run it with the -V option, it says: # Could not find source file 'MyModule.pm' in @INC or @IncludeLibs. Skipping it. # Legend: [C]ore [X]ternal [S]ubmodule [?]NotOnCPAN No modules found! The problem appears to be in the function scan_line, in ScanDeps.pm line 816. Adding the following line: unshift(@INC, $_) if -d $_; seems to solve the problem.