[dw-free] Warnings in cgi-bin/modperl.pl at Apache startup
[commit: http://hg.dwscoalition.org/dw-free/rev/b0f9e759006e]
http://bugs.dwscoalition.org/show_bug.cgi?id=3206
Silence warnings when require caused a runtime error (leaving the file value
in %INC undef)
Patch by
pauamma.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3206
Silence warnings when require caused a runtime error (leaving the file value
in %INC undef)
Patch by
Files modified:
- cgi-bin/modperl.pl
--------------------------------------------------------------------------------
diff -r 4b6fedbcf117 -r b0f9e759006e cgi-bin/modperl.pl
--- a/cgi-bin/modperl.pl Wed Nov 24 19:34:56 2010 +0800
+++ b/cgi-bin/modperl.pl Wed Nov 24 19:37:02 2010 +0800
@@ -57,6 +57,7 @@ delete $INC{"$LJ::HOME/cgi-bin/modperl.p
# remember modtime of all loaded libraries
%LJ::LIB_MOD_TIME = ();
while (my ($k, $file) = each %INC) {
+ next unless defined $file; # Happens if require caused a runtime error
next if $LJ::LIB_MOD_TIME{$file};
next unless $file =~ m!^\Q$LJ::HOME\E!;
my $mod = (stat($file))[9];
--------------------------------------------------------------------------------
