Die if open fails in @INC handler
[p5sagit/App-FatPacker.git] / lib / App / FatPacker.pm
index 4399341..aa3caef 100644 (file)
@@ -171,7 +171,8 @@ sub script_command_file {
 
     unshift @INC, sub {
       if (my $fat = $fatpacked{$_[1]}) {
-        open my $fh, '<', \$fat;
+        open my $fh, '<', \$fat
+          or die "FatPacker error loading $_[1] (could be a perl installation issue?)";
         return $fh;
       }
       return