diff options
-rw-r--r-- | Bugzilla/RelationSet.pm | 1 | ||||
-rw-r--r-- | RelationSet.pm | 1 | ||||
-rwxr-xr-x | checksetup.pl | 13 |
3 files changed, 8 insertions, 7 deletions
diff --git a/Bugzilla/RelationSet.pm b/Bugzilla/RelationSet.pm index a3af4b60a..f2f822fc4 100644 --- a/Bugzilla/RelationSet.pm +++ b/Bugzilla/RelationSet.pm @@ -38,7 +38,6 @@ use strict; #require "globals.pl"; package RelationSet; -use CGI::Carp qw(fatalsToBrowser); # create a new empty RelationSet # diff --git a/RelationSet.pm b/RelationSet.pm index a3af4b60a..f2f822fc4 100644 --- a/RelationSet.pm +++ b/RelationSet.pm @@ -38,7 +38,6 @@ use strict; #require "globals.pl"; package RelationSet; -use CGI::Carp qw(fatalsToBrowser); # create a new empty RelationSet # diff --git a/checksetup.pl b/checksetup.pl index 5f05e7c7a..eae9e39bc 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -187,8 +187,15 @@ sub have_vers { no strict 'refs'; printf("Checking for %15s %-9s ", $pkg, !$wanted?'(any)':"(v$wanted)") unless $silent; - eval { my $p; ($p = $pkg . ".pm") =~ s!::!/!g; require $p; }; + # Modules may change $SIG{__DIE__} and $SIG{__WARN__}, so localise them here + # so that later errors display 'normally' + local $::SIG{__DIE__}; + local $::SIG{__WARN__}; + eval "require $pkg;"; + + # do this twice to avoid a "used only once" error for these vars + $vnum = ${"${pkg}::VERSION"} || ${"${pkg}::Version"} || 0; $vnum = ${"${pkg}::VERSION"} || ${"${pkg}::Version"} || 0; $vnum = -1 if $@; @@ -260,11 +267,7 @@ my $modules = [ my %missing = (); -# Modules may change $SIG{__DIE__} and $SIG{__WARN__}, so localise them here -# so that later errors display 'normally' foreach my $module (@{$modules}) { - local $::SIG{__DIE__}; - local $::SIG{__WARN__}; unless (have_vers($module->{name}, $module->{version})) { $missing{$module->{name}} = $module->{version}; } |