diff --git a/mozilla/webtools/bugzilla/Bugzilla/Bug.pm b/mozilla/webtools/bugzilla/Bugzilla/Bug.pm index ba69932e90d..60e9cb1f826 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/Bug.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/Bug.pm @@ -30,8 +30,6 @@ package Bugzilla::Bug; use strict; -use CGI::Carp qw(fatalsToBrowser); - use Bugzilla::Attachment; use Bugzilla::Constants; use Bugzilla::Field; diff --git a/mozilla/webtools/bugzilla/Bugzilla/CGI.pm b/mozilla/webtools/bugzilla/Bugzilla/CGI.pm index dd6061346c0..51c26347228 100644 --- a/mozilla/webtools/bugzilla/Bugzilla/CGI.pm +++ b/mozilla/webtools/bugzilla/Bugzilla/CGI.pm @@ -36,7 +36,6 @@ BEGIN { use CGI qw(-no_xhtml -oldstyle_urls :private_tempfiles :unique_headers SERVER_PUSH); use base qw(CGI); -use CGI::Carp qw(fatalsToBrowser); use Bugzilla::Error; use Bugzilla::Util; @@ -62,6 +61,11 @@ sub new { my $self = $class->SUPER::new(@args); + # This happens here so that command-line scripts don't spit out + # their errors in HTML format. + require CGI::Carp; + import CGI::Carp qw(fatalsToBrowser); + # Make sure our outgoing cookie list is empty on each invocation $self->{Bugzilla_cookie_list} = [];