fix PLP::everything() wrapper
[perl/plp/.git] / lib / PLP.pm
index 42866dc20f85d110662693e0c203a55faae94615..b9e3b7eef5c4ab59b01044c6aba37f6dd0732b49 100644 (file)
@@ -83,7 +83,7 @@ sub error {
 # Wrap old request handlers.
 sub everything {
        require PLP::Backend::CGI;
-       PLP::Backend::CGI::everything();
+       PLP::Backend::CGI->everything();
 }
 sub handler {
        require PLP::Backend::Apache;
@@ -94,7 +94,10 @@ sub handler {
 sub sendheaders () {
        $PLP::sentheaders ||= [ caller 1 ? (caller 1)[1, 2] : (caller)[1, 2] ];
        print STDOUT "Content-Type: text/plain\n\n" if $PLP::DEBUG & 2;
-       print STDOUT map("$_: $PLP::Script::header{$_}\n", keys %PLP::Script::header), "\n";
+       while (my ($header, $values) = each %PLP::Script::header) {
+               print STDOUT "$header: $_\n" for split /\n/, $values;
+       }
+       print STDOUT "\n";
 }
 
 {