Append $\ in Catalyst::Response->print
Dagfinn Ilmari Mannsåker [Mon, 16 May 2011 15:03:43 +0000 (16:03 +0100)]
This more closely matches IO::Handle's behaviour.

lib/Catalyst/Response.pm
t/aggregate/live_engine_response_print.t
t/lib/TestApp/Controller/Engine/Response/Print.pm

index 2bf4dfe..818ae86 100644 (file)
@@ -201,6 +201,7 @@ sub print {
         defined $self->write($,) or return;
         defined $self->write($_) or return;
     }
+    defined $self->write($\) or return;
 
     return 1;
 }
index ad00ea3..4e8f024 100644 (file)
@@ -12,7 +12,7 @@ use Catalyst::Test 'TestApp';
 my $expected = {
    one => "foo",
    two => "foobar",
-   three => "foo,bar,baz",
+   three => "foo,bar,baz:",
 };
 
 for my $action ( sort keys %{$expected} ) {
index 8d986f8..13f3d04 100644 (file)
@@ -19,7 +19,9 @@ sub three :Relative {
     my ( $self, $c ) = @_;
 
     local $, = ',';
+    local $\ = ':';
     $c->res->print(qw/foo bar baz/);
 }
 
+
 1;