use do() instead of require() to include configuration
When run under mod_perl, require() will read and execute the configuration file on the first invocation only. On every subsequent invocation, all configuration variables will be reset to their default values. do() reads and executes the configuration file unconditionally. Signed-off-by: Dennis Stosberg <dennis@stosberg.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Dennis Stosberg committed
Aug 29, 2006 at 09:19 UTC
4b5dc988c0db1e7ce5ba41c09a1e75cbc71c3f35
1 file changed
+1
-1
gitweb/gitweb.perl
+1
-1
@@ -152,7 +152,7 @@ sub feature_snapshot {
152
our @diff_opts = ('-M'); # taken from git_commit
153
154
our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
155
-require $GITWEB_CONFIG if -e $GITWEB_CONFIG;
155
+do $GITWEB_CONFIG if -e $GITWEB_CONFIG;
156
157
# version of the core git binary
158
our $git_version = qx($GIT --version) =~ m/git version (.*)$/ ? $1 : "unknown";