Skip Menu |

This queue is for tickets about the Module-Path CPAN distribution.

Report information
The Basics
Id: 96433
Status: resolved
Priority: 0/
Queue: Module-Path

People
Owner: NEILB [...] cpan.org
Requestors: ether [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.13
Fixed in: 0.18



Subject: not gracefully handling missing dirs in @INC
You should have gotten a cpantesters report for this failure, but here's a little more info... PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01-require.t ...... ok stat(/Network/Library/Perl/5.10.0/darwin-thread-multi-2level): No such file or directory at /Users/ether/.cpanm/work/1402678239.4462/Module-Path-0.13/blib/lib/Module/Path.pm line 49. stat(/Network/Library/Perl/5.10.0): No such file or directory at /Users/ether/.cpanm/work/1402678239.4462/Module-Path-0.13/blib/lib/Module/Path.pm line 49. stat(/Network/Library/Perl): No such file or directory at /Users/ether/.cpanm/work/1402678239.4462/Module-Path-0.13/blib/lib/Module/Path.pm line 49. t/02-module-path.t .. ok # Failed test 'non-existent module should result in failure' # at t/03-mpath.t line 44. # Failed test 'got expected output' # at t/03-mpath.t line 57. # got: 'stat(/Network/Library/Perl/5.10.0/darwin-thread-multi-2level): No such file or directory at /Users/ether/.cpanm/work/1402678239.4462/Module-Path-0.13/blib/lib/Module/Path.pm line 49. # stat(/Network/Library/Perl/5.10.0): No such file or directory at /Users/ether/.cpanm/work/1402678239.4462/Module-Path-0.13/blib/lib/Module/Path.pm line 49. # stat(/Network/Library/Perl): No such file or directory at /Users/ether/.cpanm/work/1402678239.4462/Module-Path-0.13/blib/lib/Module/Path.pm line 49. # /System/Library/Perl/5.10.0/strict.pm # /System/Library/Perl/5.10.0/warnings.pm # No::Such::Module not found' # expected: '/System/Library/Perl/5.10.0/strict.pm # /System/Library/Perl/5.10.0/warnings.pm # No::Such::Module not found' # Failed test 'error message should not be printed when the option --quiet is specified' # at t/03-mpath.t line 67. # got: 'stat(/Network/Library/Perl/5.10.0/darwin-thread-multi-2level): No such file or directory at /Users/ether/.cpanm/work/1402678239.4462/Module-Path-0.13/blib/lib/Module/Path.pm line 49. # stat(/Network/Library/Perl/5.10.0): No such file or directory at /Users/ether/.cpanm/work/1402678239.4462/Module-Path-0.13/blib/lib/Module/Path.pm line 49. # stat(/Network/Library/Perl): No such file or directory at /Users/ether/.cpanm/work/1402678239.4462/Module-Path-0.13/blib/lib/Module/Path.pm line 49. # /System/Library/Perl/5.10.0/strict.pm # /System/Library/Perl/5.10.0/warnings.pm' # expected: '/System/Library/Perl/5.10.0/strict.pm # /System/Library/Perl/5.10.0/warnings.pm' # Looks like you failed 3 tests of 14. t/03-mpath.t ........ Dubious, test returned 3 (wstat 768, 0x300) Failed 3/14 subtests Test Summary Report ------------------- t/03-mpath.t (Wstat: 768 Tests: 14 Failed: 3) Failed tests: 2, 8, 11 Non-zero exit status: 3 Files=3, Tests=18, 2 wallclock secs ( 0.03 usr 0.02 sys + 0.67 cusr 0.25 csys = 0.97 CPU) Result: FAIL Failed 1/3 test programs. 3/18 subtests failed. Yes, this is my system perl (I couldn't get 5.10.0 to build from source, but since I have an older OSX, it's already here, so I'm using it with a local::lib on top to test some odd failures I'm getting with my modules...) $ which perl /usr/bin/perl $ perl -v This is perl, v5.10.0 built for darwin-thread-multi-2level $; perl -wle'print join("\n", @INC)' /Users/ether/.perlbrew/libs/10.0-system@std/lib/perl5/darwin-thread-multi-2level /Users/ether/.perlbrew/libs/10.0-system@std/lib/perl5 /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 . $; ls /Network/Library/Perl ls: /Network/Library/Perl: No such file or directory So, I would suggest that Module::Path silently skip any directories it sees in @INC that don't actually exist, since this seems to be something that actually happens. (I've never touched my system perl - never installed any modules nor touched it in any other way.)
On 2014-06-13 09:56:21, ETHER wrote: Show quoted text
> So, I would suggest that Module::Path silently skip any directories it > sees in @INC that don't actually exist, since this seems to be > something that actually happens. (I've never touched my system perl - > never installed any modules nor touched it in any other way.)
Related failure: http://www.cpantesters.org/cpan/report/0316d5a2-56d7-11e4-bb0e-e3f6bb36d621 In this dist, 't/lib' is added to @INC in the tests, and later on, the directory is changed, so 't/lib' is no longer resolvable. stat(t/lib): No such file or directory at /home/sand/src/perl/repoperls/installed-perls/perl/perl-5.10.0/5da8/lib/site_perl/5.10.0/Module/Path.pm line 50. This looks to be coming from the call to _carp in Cwd::_perl_abs_path. The recommendation quoted above stands -- you should not be dying or warning about nonexistent directories in @INC - they should simply be skipped, just as require() would. This means you shouldn't be using Cwd to turn a relative path into an absolute one, since it looks at the filesystem. Instead, take a look at File::Spec or Path::Tiny.
I saw you added to TODO.md: * Work out what the hell's going on with ETHER's bug. If I can get to next year's QAH, maybe I can debug on her laptop. This is a red herring, as this issue isn't happening on my laptop. It's happening for cpantesters -- see the reports linked above (as well as a description of the necessary solution).
Sorry, dunno why I got caught up in over-thinking this. I think the simple change I just released should sort it out... Neil