throw error for missing perl files
[p5sagit/Config-Any.git] / lib / Config / Any / Perl.pm
index ff27b12..3e27a17 100644 (file)
@@ -55,7 +55,8 @@ sub load {
         # tainted.  untaint for backwards compatibility.
         my ($cwd) = Cwd::cwd() =~ /\A(.*)\z/s;
         $content = do File::Spec->rel2abs($file, $cwd);
-        $exception = $@;
+        $exception = $@ || $!
+            if !defined $content;
     }
     die $exception if $exception;