fixed strict-violation in PLP.pm that happened only without mod_perl
[perl/plp/.git] / PLP.pm
diff --git a/PLP.pm b/PLP.pm
index 12abc1f9b7a4619229e6cac4a9be759db27ee514..3e5baf5f68fd76791d2bb82934c395c47fa7158b 100644 (file)
--- a/PLP.pm
+++ b/PLP.pm
@@ -8,10 +8,9 @@ use PLP::Tie::Headers;
 use PLP::Tie::Delay;
 use PLP::Tie::Print;
 
-use Symbol ();
-#use strict;
+use strict;
 
-our $VERSION = '3.10';
+our $VERSION = '3.11';
 
 # subs in this package:
 #  sendheaders                      Send headers
@@ -195,10 +194,10 @@ sub mod_perl_init {
     $ENV{PLP_FILENAME} = my $filename = $r->filename;
     
     unless (-f $filename) {
-       return Apache::Constants::NOT_FOUND;
+       return Apache::Constants::NOT_FOUND();
     }
     unless (-r _) {
-       return Apache::Constants::FORBIDDEN;
+       return Apache::Constants::FORBIDDEN();
     }
     
     (my $dir) = $filename =~ m!(.*)/!s;
@@ -231,8 +230,9 @@ sub start {
     }
     PLP::sendheaders() unless $PLP::sentheaders;
     select STDOUT;
-    # undef *{"PLP::Script::$_"} for keys %PLP::Script::;
-    Symbol::delete_package('PLP::Script');
+    undef *{"PLP::Script::$_"} for keys %PLP::Script::;
+#    Symbol::delete_package('PLP::Script');
+#    The above does not work. TODO - find out why not.
 }
 
 # This is run by the CGI script.
@@ -254,7 +254,8 @@ sub handler {
        return $ret;
     }
     start();
-    return Apache::Constants::OK;
+    no strict 'subs';
+    return Apache::Constants::OK();
 }
 
 1;