Change 30037 by [EMAIL PROTECTED] on 2007/01/27 17:45:27
For FindBin to work as advertised on VMS, $FindBin::Bin
must be in unix syntax.
Affected files ...
... //depot/perl/lib/FindBin.pm#23 edit
Differences ...
==== //depot/perl/lib/FindBin.pm#23 (text) ====
Index: perl/lib/FindBin.pm
--- perl/lib/FindBin.pm#22~29103~ 2006-10-25 03:27:05.000000000 -0700
+++ perl/lib/FindBin.pm 2007-01-27 09:45:27.000000000 -0800
@@ -106,6 +106,13 @@
$VERSION = "1.48";
+
+# needed for VMS-specific filename translation
+if( $^O eq 'VMS' ) {
+ require VMS::Filespec;
+ VMS::Filespec->import;
+}
+
sub cwd2 {
my $cwd = getcwd();
# getcwd might fail if it hasn't access to the current directory.
@@ -124,6 +131,7 @@
# perl invoked with -e or script is on C<STDIN>
$Script = $RealScript = $0;
$Bin = $RealBin = cwd2();
+ $Bin = VMS::Filespec::unixify($Bin) if $^O eq 'VMS';
}
else
{
@@ -131,7 +139,9 @@
if ($^O eq 'VMS')
{
- ($Bin,$Script) = VMS::Filespec::rmsexpand($0) =~ /(.*\])(.*)/s;
+ ($Bin,$Script) = VMS::Filespec::rmsexpand($0) =~ /(.*[\]>]+)(.*)/s;
+ # C<use disk:[dev]/lib> isn't going to work, so unixify first
+ ($Bin = VMS::Filespec::unixify($Bin)) =~ s/\/\z//;
($RealBin,$RealScript) = ($Bin,$Script);
}
else
End of Patch.