From: Mischa POSLAWSKY Date: Mon, 29 Sep 2014 19:58:00 +0000 (+0000) Subject: Apache: avoid undefinedness warning without PLPcache X-Git-Tag: 3.25~4 X-Git-Url: http://git.shiar.net/perl/plp/.git/commitdiff_plain/0409a4cb0467ceb1c5b4bed6fcb631c026aee9dd Apache: avoid undefinedness warning without PLPcache Same results but without potentially clogging error logs with: > Use of uninitialized value in pattern match (m//) --- diff --git a/lib/PLP/Backend/Apache.pm b/lib/PLP/Backend/Apache.pm index 6964b56..cd5b16f 100644 --- a/lib/PLP/Backend/Apache.pm +++ b/lib/PLP/Backend/Apache.pm @@ -45,7 +45,7 @@ sub init { $ENV{PLP_NAME} = $r->uri; - $PLP::use_cache = $r->dir_config('PLPcache') !~ /^off$/i; + $PLP::use_cache = ($r->dir_config('PLPcache') || 'on') !~ /^off$/i; #S $PLP::use_safe = $r->dir_config('PLPsafe') =~ /^on$/i; my $path = $r->filename(); my ($file, $dir) = File::Basename::fileparse($path);