Apache: avoid undefinedness warning without PLPcache
[perl/plp/.git] / lib / PLP / Backend / Apache.pm
index 62caadcb1e2b5debb3af827a9639667db749c16e..cd5b16f34ce92367f2c56d33eb3c910083dd4ccc 100644 (file)
@@ -1,6 +1,7 @@
 package PLP::Backend::Apache;
 
 use strict;
+use warnings;
 
 our $VERSION = '1.00';
 
@@ -44,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);