File::Spec: Mopre extensive fix for #120593
authorBrian Fraser <fraserbn@gmail.com>
Wed, 5 Feb 2014 06:36:15 +0000 (03:36 -0300)
committerBrian Fraser <fraserbn@gmail.com>
Wed, 5 Feb 2014 07:33:01 +0000 (04:33 -0300)
The original fix only handled '.', this one handles all relative
paths.

dist/PathTools/Cwd.pm
dist/PathTools/lib/File/Spec.pm
dist/PathTools/lib/File/Spec/Cygwin.pm
dist/PathTools/lib/File/Spec/Epoc.pm
dist/PathTools/lib/File/Spec/Functions.pm
dist/PathTools/lib/File/Spec/Mac.pm
dist/PathTools/lib/File/Spec/OS2.pm
dist/PathTools/lib/File/Spec/Unix.pm
dist/PathTools/lib/File/Spec/VMS.pm
dist/PathTools/lib/File/Spec/Win32.pm

index 0c9b82d..f27a3a0 100644 (file)
@@ -171,7 +171,7 @@ use strict;
 use Exporter;
 use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
 
-$VERSION = '3.46';
+$VERSION = '3.47';
 my $xs_version = $VERSION;
 $VERSION =~ tr/_//;
 
index 7bcd08d..3d07687 100644 (file)
@@ -3,7 +3,7 @@ package File::Spec;
 use strict;
 use vars qw(@ISA $VERSION);
 
-$VERSION = '3.46';
+$VERSION = '3.47';
 $VERSION =~ tr/_//;
 
 my %module = (MacOS   => 'Mac',
index d8ceaac..c356884 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.46';
+$VERSION = '3.47';
 $VERSION =~ tr/_//;
 
 @ISA = qw(File::Spec::Unix);
index e5ac358..a7ad3fb 100644 (file)
@@ -3,7 +3,7 @@ package File::Spec::Epoc;
 use strict;
 use vars qw($VERSION @ISA);
 
-$VERSION = '3.46';
+$VERSION = '3.47';
 $VERSION =~ tr/_//;
 
 require File::Spec::Unix;
index 2bb3218..24c88a8 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 
 use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
 
-$VERSION = '3.46';
+$VERSION = '3.47';
 $VERSION =~ tr/_//;
 
 require Exporter;
index 117de58..3568d8d 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.46';
+$VERSION = '3.47';
 $VERSION =~ tr/_//;
 
 @ISA = qw(File::Spec::Unix);
index b619cdf..a8eca69 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.46';
+$VERSION = '3.47';
 $VERSION =~ tr/_//;
 
 @ISA = qw(File::Spec::Unix);
index 26cd78d..3d62478 100644 (file)
@@ -3,7 +3,7 @@ package File::Spec::Unix;
 use strict;
 use vars qw($VERSION);
 
-$VERSION = '3.46';
+$VERSION = '3.47';
 my $xs_version = $VERSION;
 $VERSION =~ tr/_//;
 
@@ -192,11 +192,10 @@ sub _tmpdir {
     }
     $tmpdir = $self->curdir unless defined $tmpdir;
     $tmpdir = defined $tmpdir && $self->canonpath($tmpdir);
-    if ( $tmpdir eq '.' ) {
+    if ( !$self->file_name_is_absolute($tmpdir) ) {
         # See [perl #120593] for the full details
-        # If possible, return a full path, rather than '.', but
-        # we have to avoid returning a tainted value, so we jump
-        # through some hoops.
+        # If possible, return a full path, rather than '.' or 'lib', but
+        # jump through some hoops to avoid returning a tainted value.
         ($tmpdir) = grep {
             $taint     ? ! Scalar::Util::tainted($_) :
             $] < 5.007 ? eval { eval('1'.substr $_,0,0) } : 1
index 431546a..24052e6 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.46';
+$VERSION = '3.47';
 $VERSION =~ tr/_//;
 
 @ISA = qw(File::Spec::Unix);
index ddb37c7..e26479c 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.46';
+$VERSION = '3.47';
 $VERSION =~ tr/_//;
 
 @ISA = qw(File::Spec::Unix);