summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Extension.pm
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2018-04-25 23:02:30 +0200
committerdklawren <dklawren@users.noreply.github.com>2018-04-25 23:02:30 +0200
commit132700438a4d409a7c9f76be7cfed4d18130a4dd (patch)
treed96ce2f43137a105e3b9fdca2cc0fc2c01cae9f2 /Bugzilla/Extension.pm
parent993e754afdf6a94e128633be7261e27cfc384f2c (diff)
downloadbugzilla-132700438a4d409a7c9f76be7cfed4d18130a4dd.tar.gz
bugzilla-132700438a4d409a7c9f76be7cfed4d18130a4dd.tar.xz
Bug 1441732 - Improve missing module error in Bugzilla::Extensions and catch more compile errors in tests
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 ) {