X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FRequest.pm;h=9f0e4ec6f599504b3bde626ea4c4c9a9690a2769;hb=9c7b676881de2255b45fdab5bfb71f58a5e6d236;hp=15f7b7b6b0cb053ef3498f60cd59430d02a0d372;hpb=f152ae23b886a4f0bcfaeaf401ea2bf71cd30ab1;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Request.pm b/lib/Catalyst/Request.pm index 15f7b7b..9f0e4ec 100644 --- a/lib/Catalyst/Request.pm +++ b/lib/Catalyst/Request.pm @@ -17,7 +17,7 @@ use namespace::clean -except => 'meta'; with 'MooseX::Emulate::Class::Accessor::Fast'; -has env => (is => 'ro', writer => '_set_env', predicate => 'has_env'); +has env => (is => 'ro', writer => '_set_env', predicate => '_has_env'); # XXX Deprecated crap here - warn? has action => (is => 'rw'); # XXX: Deprecated in docs ages ago (2006), deprecated with warning in 5.8000 due @@ -96,7 +96,7 @@ has _log => ( has io_fh => ( is=>'ro', - predicate=>'has_io_fh', + predicate=>'_has_io_fh', lazy=>1, builder=>'_build_io_fh'); @@ -243,7 +243,7 @@ sub prepare_body { # If previously applied middleware created the HTTP::Body object, then we # just use that one. - if(my $plack_body = $self->env->{'plack.request.http.body'}) { + if(my $plack_body = $self->_has_env ? $self->env->{'plack.request.http.body'} : undef) { $self->_body($plack_body); $self->_body->cleanup(1); return;