summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Extension.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Extension.pm')
-rw-r--r--Bugzilla/Extension.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla/Extension.pm b/Bugzilla/Extension.pm
index a41ac9326..8e173c711 100644
--- a/Bugzilla/Extension.pm
+++ b/Bugzilla/Extension.pm
@@ -35,7 +35,11 @@ sub INC_HOOK {
my $first = 1;
untaint($real_file);
$INC{$fake_file} = $real_file;
- open my $fh, '<', $real_file or die "invalid file: $real_file";
+ my $found = open my $fh, '<', $real_file;
+ unless ($found) {
+ require Carp;
+ Carp::croak "Can't locate $fake_file while looking for $real_file in \@INC (\@INC contains: @INC)";
+ }
return sub {
no warnings;
if ( !$first ) {