This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: FindBin.pm: incomplete getcwd/cwd patch and SELinux (Strict policy)
authorJosé Pedro Oliveira <jpo@di.uminho.pt>
Tue, 7 Jun 2005 21:07:42 +0000 (22:07 +0100)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 8 Jun 2005 09:12:17 +0000 (09:12 +0000)
Message-ID: <42A5FE8E.3020608@di.uminho.pt>

p4raw-id: //depot/perl@24753

lib/FindBin.pm

index 353a904..0dbe550 100644 (file)
@@ -104,7 +104,7 @@ use File::Spec;
 %EXPORT_TAGS = (ALL => [qw($Bin $Script $RealBin $RealScript $Dir $RealDir)]);
 @ISA = qw(Exporter);
 
-$VERSION = "1.46";
+$VERSION = "1.47";
 
 sub cwd2 {
    my $cwd = getcwd();
@@ -188,7 +188,11 @@ sub init
       }
 
      # Get absolute paths to directories
-     $Bin     = abs_path($Bin)     if($Bin);
+     if ($Bin) {
+      my $BinOld = $Bin;
+      $Bin = abs_path($Bin);
+      defined $Bin or $Bin = File::Spec->canonpath($BinOld);
+     }
      $RealBin = abs_path($RealBin) if($RealBin);
     }
   }