make xsubpp generate well-formed code with CAPI && !PERL_OBJECT
[p5sagit/p5-mst-13.2.git] / lib / FindBin.pm
index d908121..d6bd7b7 100644 (file)
@@ -82,15 +82,21 @@ use File::Basename;
 %EXPORT_TAGS = (ALL => [qw($Bin $Script $RealBin $RealScript $Dir $RealDir)]);
 @ISA = qw(Exporter);
 
-$VERSION = $VERSION = sprintf("%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/);
+$VERSION = $VERSION = sprintf("%d.%02d", q$Revision: 1.41 $ =~ /(\d+)\.(\d+)/);
 
 sub is_abs_path
 {
  local $_ = shift if (@_);
- if ($^O eq 'MSWin32')
+ if ($^O eq 'MSWin32' || $^O eq 'dos')
   {
    return m#^[a-z]:[\\/]#i;
   }
+ elsif ($^O eq 'VMS')
+  {
+    # If it's a logical name, expand it.
+    $_ = $ENV{$_} while /^[\w\$\-]+$/ and $ENV{$_};
+    return m!^/! or m![<\[][^.\-\]>]! or /:[^<\[]/;
+  }
  else
   {
    return m#^/#;
@@ -125,7 +131,7 @@ BEGIN
             && -f $script)
       {
        my $dir;
-       my $pathvar = ($IsWin32) ? 'Path' : 'PATH';
+       my $pathvar = 'PATH';
 
        foreach $dir (split(/$Config{'path_sep'}/,$ENV{$pathvar}))
        {