diff options
author | bbaetz%student.usyd.edu.au <> | 2002-09-05 06:30:43 +0000 |
---|---|---|
committer | bbaetz%student.usyd.edu.au <> | 2002-09-05 06:30:43 +0000 |
commit | 7fb4c30eea4e7a34d07f5e9eff5b379c98da7913 (patch) | |
tree | a171badc70b468db67eb56530c61660175d0125c | |
parent | a0af1dbb901eaef38b51765ef9a878c0d4d230db (diff) | |
download | bugs-7fb4c30eea4e7a34d07f5e9eff5b379c98da7913.tar bugs-7fb4c30eea4e7a34d07f5e9eff5b379c98da7913.tar.gz bugs-7fb4c30eea4e7a34d07f5e9eff5b379c98da7913.tar.bz2 bugs-7fb4c30eea4e7a34d07f5e9eff5b379c98da7913.tar.xz bugs-7fb4c30eea4e7a34d07f5e9eff5b379c98da7913.zip |
Bug 146134 - checksetup.pl gives weird error message
r=justdave x2
-rwxr-xr-x | checksetup.pl | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/checksetup.pl b/checksetup.pl index 59c5cb78b..050d300eb 100755 --- a/checksetup.pl +++ b/checksetup.pl @@ -248,21 +248,17 @@ 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}; } } -# If CGI::Carp was loaded successfully for version checking, it changes the -# die and warn handlers, we don't want them changed, so we need to stash the -# original ones and set them back afterwards -- justdave@syndicomm.com -my $saved_die_handler = $::SIG{__DIE__}; -my $saved_warn_handler = $::SIG{__WARN__}; -unless (have_vers("CGI::Carp",0)) { $missing{'CGI::Carp'} = 0 } -$::SIG{__DIE__} = $saved_die_handler; -$::SIG{__WARN__} = $saved_warn_handler; - print "\nThe following Perl modules are optional:\n" unless $silent; my $charts = 0; $charts++ if have_vers("GD","1.19"); |