]> Sergey Matveev's repositories - public-inbox.git/blobdiff - t/httpd-corner.psgi
localize $/ in more places to avoid potential problems
[public-inbox.git] / t / httpd-corner.psgi
index 2f7be8320eaf518cb2772e7a53519df6f245f7c2..222b9e01a058bd82cd102ba46a03957de92c4eef 100644 (file)
@@ -30,6 +30,7 @@ my $app = sub {
                        return sub {
                                open my $f, '<', $fifo or
                                                die "open $fifo: $!\n";
+                               local $/ = "\n";
                                my @r = <$f>;
                                $_[0]->([200, $h, \@r ]);
                        };
@@ -38,6 +39,7 @@ my $app = sub {
                                my $fh = $_[0]->([200, $h]);
                                open my $f, '<', $fifo or
                                                die "open $fifo: $!\n";
+                               local $/ = "\n";
                                while (defined(my $l = <$f>)) {
                                        $fh->write($l);
                                }