output multiline %headers as multiple headers of the same name
[perl/plp/.git] / lib / PLP / Functions.pm
index 28815cd2e2ba2559b22a77ee49596e808101ff14..f3621671470603b3f04f3dc086c57b22ca9ca09b 100644 (file)
@@ -1,9 +1,12 @@
 package PLP::Functions;
 
-use base 'Exporter';
-use Fcntl qw(:flock);
 use strict;
+use warnings;
+
+use Exporter qw(import);
+use Fcntl qw(:flock);
 
+our $VERSION = '1.00';
 our @EXPORT = qw/Entity DecodeURI EncodeURI Include include PLP_END
                  AddCookie ReadFile WriteFile AutoURL Counter exit/;
 
@@ -72,7 +75,7 @@ sub EncodeURI (@) {
 
 sub AddCookie ($) {
        if ($PLP::Script::header{'Set-Cookie'}) {
-               $PLP::Script::header{'Set-Cookie'} .= "\nSet-Cookie: $_[0]";
+               $PLP::Script::header{'Set-Cookie'} .= "\n" . $_[0];
        } else {
                $PLP::Script::header{'Set-Cookie'} = $_[0];
        }