X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FResponse.pm;h=2bf4dfeed04ab7be1100ca8fbaed19fa61722c6e;hb=ffb438031c2764e94ffe9e9af68a1b172eac4740;hp=f268aefbee830273aaedc6d3c1859b86cb30e983;hpb=ee24f3a811ffe5b55e2645cfcb060b0fc4800cfb;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Response.pm b/lib/Catalyst/Response.pm index f268aef..2bf4dfe 100644 --- a/lib/Catalyst/Response.pm +++ b/lib/Catalyst/Response.pm @@ -6,14 +6,9 @@ use HTTP::Headers; with 'MooseX::Emulate::Class::Accessor::Fast'; has cookies => (is => 'rw', default => sub { {} }); -has body => (is => 'rw', default => '', lazy => 1, predicate => 'has_body', - clearer => '_clear_body' -); -after 'body' => sub { # If someone assigned undef, clear the body so we get '' - if (scalar(@_) == 2 && !defined($_[1])) { - $_[0]->_clear_body; - } -}; +has body => (is => 'rw', default => undef); +sub has_body { defined($_[0]->body) } + has location => (is => 'rw'); has status => (is => 'rw', default => 200); has finalized_headers => (is => 'rw', default => 0);