Skip Menu |

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

Report information
The Basics
Id: 29866
Status: resolved
Priority: 0/
Queue: Module-Install

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

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



Subject: [PATCH] The can_run() method can return false positives
The can_run() method can return false positives when the PATH begins with the $Config{path_sep} character and a directory of the same name as the program being tested for exists. For example, if you run "perl Makefile.PL" in the attached Foo-1.00.tar.gz then it wrong says "Can run test" if a directory called /test exists and your PATH happens to begin with the $Config{path_sep} character, even through no program called "test" actually exists. This has caused a problem reported for the Filter-Crypto distribution: see http://rt.cpan.org/Ticket/Display.html?id=29795. The attached can.patch fixes this by skipping any null strings in the list returned by split(/$Config::Config{path_sep}/, $ENV{PATH}).
Subject: can.patch
diff -ruN Module-Install-0.67.orig/lib/Module/Install/Can.pm Module-Install-0.67/lib/Module/Install/Can.pm --- Module-Install-0.67.orig/lib/Module/Install/Can.pm 2007-05-09 07:52:46.000000000 +0100 +++ Module-Install-0.67/lib/Module/Install/Can.pm 2007-10-09 13:48:18.531552100 +0100 @@ -38,6 +38,7 @@ return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd)); for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') { + next if $dir eq ''; my $abs = File::Spec->catfile($dir, $_[1]); return $abs if (-x $abs or $abs = MM->maybe_command($abs)); }
Subject: Foo-1.00.tar.gz
Download Foo-1.00.tar.gz
application/x-gzip 4.3k

Message body not shown because it is not plain text.

Fixed, will appear in 0.77