]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 599552: Clean up mod_perl.pl, and make it use the same CGI.pm compile
authorMax Kanat-Alexander <mkanat@bugzilla.org>
Mon, 15 Nov 2010 07:28:13 +0000 (23:28 -0800)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Mon, 15 Nov 2010 07:28:13 +0000 (23:28 -0800)
options as mod_cgi does.
r=glob, a=mkanat

mod_perl.pl

index 32fe82ccfe24ea92c4a433ad19be91c0f1d0508d..15dec263acd0c84fa9aa450120784843c6d0834a 100644 (file)
@@ -16,7 +16,6 @@
 # Contributor(s): Max Kanat-Alexander <mkanat@bugzilla.org>
 
 package Bugzilla::ModPerl;
-
 use strict;
 
 # If you have an Apache2::Status handler in your Apache configuration,
@@ -30,22 +29,21 @@ use strict;
 
 use Apache2::ServerUtil;
 use ModPerl::RegistryLoader ();
-use CGI ();
-CGI->compile(qw(:cgi -no_xhtml -oldstyle_urls :private_tempfiles
-                :unique_headers SERVER_PUSH :push));
 use File::Basename ();
-use Template::Config ();
-Template::Config->preload();
 
+# This loads most of our modules.
 use Bugzilla ();
-use Bugzilla::Constants ();
+# Loading Bugzilla.pm doesn't load this, though, and we want it preloaded.
+use Bugzilla::BugMail ();
 use Bugzilla::CGI ();
+use Bugzilla::Constants ();
 use Bugzilla::Extension ();
 use Bugzilla::Install::Requirements ();
-use Bugzilla::Mailer ();
-use Bugzilla::Template ();
 use Bugzilla::Util ();
 
+# Pre-compile the CGI.pm methods that we're going to use.
+Bugzilla::CGI->compile(qw(:cgi :push));
+
 my ($sizelimit, $maxrequests) = ('', '');
 if (Bugzilla::Constants::ON_WINDOWS) {
     $maxrequests = "MaxRequestsPerChild 25";