v3.18 release
[perl/plp/.git] / PLP.pm
diff --git a/PLP.pm b/PLP.pm
index 2f9db4d6ea3a832c62e091f237168626d2ae8a0e..60d43a1370717d7daea5c7ad3351f8b43a742fc0 100644 (file)
--- a/PLP.pm
+++ b/PLP.pm
@@ -14,7 +14,7 @@ use Cwd ();
 
 use strict;
 
-our $VERSION = '3.17';
+our $VERSION = '3.18';
 
 # Subs in this package:
 #  _default_error($plain, $html)    Default error handler
@@ -68,7 +68,7 @@ sub cgi_init {
 
     delete @ENV{
        qw(PATH_TRANSLATED SCRIPT_NAME SCRIPT_FILENAME PATH_INFO),
-        grep { /^REDIRECT_/ } keys %ENV
+        grep /^REDIRECT_/, keys %ENV
     };
 
     $ENV{PATH_INFO} = $path_info if defined $path_info;
@@ -261,14 +261,14 @@ sub sendheaders () {
                my $part = $1;
                if ($part eq '<:=' and not $in_block) {
                    $in_block = 2;
-                   $source .= "\cQ, ";
+                   $source .= "\cQ, (";
                } elsif ($part eq '<:' and not $in_block) {
                    $in_block = 1;
                    $source .= "\cQ; ";
                } elsif ($part eq ':>' and $in_block) {
                    $source .= (
                          $in_block == 2
-                       ? ", q\cQ"               # 2
+                       ? "), q\cQ"              # 2
                        : "; $PLP::print q\cQ"   # 1
                    );
                    $in_block = 0;
@@ -285,6 +285,14 @@ sub sendheaders () {
                }
            }
        }
+       
+       if ($in_block) {
+           $source .= (
+                 $in_block == 2
+               ? "), q\cQ"              # 2
+               : "; $PLP::print q\cQ"   # 1
+           );
+       }
 
        if ($use_cache) {
            $cached{$path}[1] = $source;