summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 45c9a75)
raw | patch | inline | side by side (parent: 45c9a75)
author | Jakub Narebski <jnareb@gmail.com> | |
Wed, 27 Dec 2006 23:00:52 +0000 (00:00 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 28 Dec 2006 08:57:31 +0000 (00:57 -0800) |
Following advice from CGI(3pm) man page, precompile all CGI routines
for mod_perl, in the BEGIN block.
If you want to compile without importing use the compile() method
instead:
use CGI();
CGI->compile();
This is particularly useful in a mod_perl environment, in which you
might want to precompile all CGI routines in a startup script, and then
import the functions individually in each mod_perl script.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
for mod_perl, in the BEGIN block.
If you want to compile without importing use the compile() method
instead:
use CGI();
CGI->compile();
This is particularly useful in a mod_perl environment, in which you
might want to precompile all CGI routines in a startup script, and then
import the functions individually in each mod_perl script.
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
gitweb/gitweb.perl | patch | blob | history |
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index a0a614acafe2f346e505ff5e69c21fff07f8e0c0..d845e91e202233916a91a7095e4a81142687c9c7 100755 (executable)
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
use File::Basename qw(basename);
binmode STDOUT, ':utf8';
+BEGIN {
+ CGI->compile() if $ENV{MOD_PERL};
+}
+
our $cgi = new CGI;
our $version = "++GIT_VERSION++";
our $my_url = $cgi->url();