]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 655847: Accessing buglist.cgi throws: Use of inherited AUTOLOAD for non-method...
authorFrédéric Buclin <LpSolit@gmail.com>
Sun, 29 May 2011 12:56:37 +0000 (14:56 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Sun, 29 May 2011 12:56:37 +0000 (14:56 +0200)
r/a=mkanat

Bugzilla/CGI.pm

index 40eab2a15e4812e27e5f707ad0ae824018b2067a..627b78b581e65e08d237656fcde8c0c935b18dc8 100644 (file)
@@ -38,17 +38,9 @@ BEGIN {
         # isn't Windows friendly (Bug 248988)
         $ENV{'TMPDIR'} = $ENV{'TEMP'} || $ENV{'TMP'} || "$ENV{'WINDIR'}\\TEMP";
     }
+    *AUTOLOAD = \&CGI::AUTOLOAD;
 }
 
-# CGI.pm uses AUTOLOAD, but explicitly defines a DESTROY sub.
-# We need to do so, too, otherwise perl dies when the object is destroyed
-# and we don't have a DESTROY method (because CGI.pm's AUTOLOAD will |die|
-# on getting an unknown sub to try to call)
-sub DESTROY {
-    my $self = shift;
-    $self->SUPER::DESTROY(@_);
-};
-
 sub _init_bz_cgi_globals {
     my $invocant = shift;
     # We need to disable output buffering - see bug 179174