Blob Blame History Raw
diff -up PathTools/Cwd.pm.cve PathTools/Cwd.pm
--- PathTools/Cwd.pm.cve	2016-03-01 13:33:02.000000000 +0100
+++ PathTools/Cwd.pm	2016-08-02 13:39:39.814316060 +0200
@@ -40,7 +40,10 @@ if ($^O eq 'os2') {
 my $use_vms_feature;
 BEGIN {
     if ($^O eq 'VMS') {
-        if (eval { local $SIG{__DIE__}; require VMS::Feature; }) {
+        if (eval { local $SIG{__DIE__};
+                   local @INC = @INC;
+                   pop @INC if $INC[-1] eq '.';
+                   require VMS::Feature; }) {
             $use_vms_feature = 1;
         }
     }
diff -up PathTools/lib/File/Spec/Cygwin.pm.cve PathTools/lib/File/Spec/Cygwin.pm
--- PathTools/lib/File/Spec/Cygwin.pm.cve	2016-03-01 13:33:02.000000000 +0100
+++ PathTools/lib/File/Spec/Cygwin.pm	2016-08-02 13:39:39.814316060 +0200
@@ -137,7 +137,11 @@ sub case_tolerant {
   if ($mntopts and ($mntopts =~ /,managed/)) {
     return 0;
   }
-  eval { require Win32API::File; } or return 1;
+  eval {
+      local @INC = @INC;
+      pop @INC if $INC[-1] eq '.';
+      require Win32API::File;
+  } or return 1;
   my $osFsType = "\0"x256;
   my $osVolName = "\0"x256;
   my $ouFsFlags = 0;
diff -up PathTools/lib/File/Spec/VMS.pm.cve PathTools/lib/File/Spec/VMS.pm
--- PathTools/lib/File/Spec/VMS.pm.cve	2016-03-01 13:33:02.000000000 +0100
+++ PathTools/lib/File/Spec/VMS.pm	2016-08-02 13:39:39.814316060 +0200
@@ -39,7 +39,10 @@ via the C<DECC$FILENAME_UNIX_REPORT> CRT
 
 my $use_feature;
 BEGIN {
-    if (eval { local $SIG{__DIE__}; require VMS::Feature; }) {
+    if (eval { local $SIG{__DIE__};
+               local @INC = @INC;
+               pop @INC if $INC[-1] eq '.';
+               require VMS::Feature; }) {
         $use_feature = 1;
     }
 }
diff -up PathTools/lib/File/Spec/Win32.pm.cve PathTools/lib/File/Spec/Win32.pm
--- PathTools/lib/File/Spec/Win32.pm.cve	2016-03-01 13:33:02.000000000 +0100
+++ PathTools/lib/File/Spec/Win32.pm	2016-08-02 13:39:39.814316060 +0200
@@ -90,7 +90,11 @@ Default: 1
 =cut
 
 sub case_tolerant {
-  eval { require Win32API::File; } or return 1;
+  eval {
+    local @INC = @INC;
+    pop @INC if $INC[-1] eq '.';
+    require Win32API::File;
+  } or return 1;
   my $drive = shift || "C:";
   my $osFsType = "\0"x256;
   my $osVolName = "\0"x256;