Subject: | PATHEXT logic bug if cmd_name contains 5.11.1 |
( $cmd_name !~ /\..+$/ ) ## Only run if cmd_name has no extension?
will match '.11.1/perl' if
$cmd_name = 'C:/perl/5.11.1/perl';
See attached patch-IPC-Run-0.84-IPC-Run-0.8401.txt
Subject: | patch-IPC-Run-0.84-IPC-Run-0.8401.txt |
diff -ruN IPC-Run-0.84/lib/IPC/Run/Win32IO.pm IPC-Run-0.8401/lib/IPC/Run/Win32IO.pm
--- IPC-Run-0.84/lib/IPC/Run/Win32IO.pm 2009-07-12 17:57:41.000000000 -0700
+++ IPC-Run-0.8401/lib/IPC/Run/Win32IO.pm 2009-10-21 20:18:40.000000000 -0700
@@ -393,7 +393,7 @@
{
$port = $next_port;
$next_port = 2048 if ++$next_port > 65_535;
- unless ( bind $listener, sockaddr_in( $port, INADDR_ANY ) ) {
+ unless ( bind $listener, sockaddr_in( $port, $loopback ) ) {
push @errors, "$! on port $port";
croak join "\n", @errors if @errors > 10;
goto PORT_FINDER_LOOP;
diff -ruN IPC-Run-0.84/lib/IPC/Run.pm IPC-Run-0.8401/lib/IPC/Run.pm
--- IPC-Run-0.84/lib/IPC/Run.pm 2009-07-12 17:57:41.000000000 -0700
+++ IPC-Run-0.8401/lib/IPC/Run.pm 2009-10-22 01:12:12.406250000 -0700
@@ -1011,7 +1011,7 @@
use Exporter ();
use vars qw{$VERSION @ISA @FILTER_IMP @FILTERS @API @EXPORT_OK %EXPORT_TAGS};
BEGIN {
- $VERSION = '0.84';
+ $VERSION = '0.8401';
@ISA = qw{ Exporter };
## We use @EXPORT for the end user's convenience: there's only one function
@@ -1149,12 +1149,16 @@
if ( Win32_MODE
&& ( $cmd_name =~ /$dirsep/ )
- && ( $cmd_name !~ /\..+$/ ) ## Only run if cmd_name has no extension?
+# && ( $cmd_name !~ /\..+$/ ) ## Only run if cmd_name has no extension?
+ && ( $cmd_name !~ m!\.[^\\/\.]+$! )
) {
+
+ _debug "no extension(.exe), checking ENV{PATHEXT}" if _debugging;
for ( split /;/, $ENV{PATHEXT} || ".COM;.BAT;.EXE" ) {
my $name = "$cmd_name$_";
$cmd_name = $name, last if -f $name && -x _;
}
+ _debug "cmd_name is now '$cmd_name'" if _debugging;
}
if ( $cmd_name =~ /($dirsep)/ ) {