X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FRequest.pm;h=9c9705eb8d9ee3c92a8ea024389c974f9bc58aa6;hb=14c057aacee82ad6b1bde6977b50a5ae10999968;hp=643a2984463039f1802b8b56d6ec8bbfc6b27169;hpb=9779c885c17ff277c42aea35bd95f48284ae502f;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Request.pm b/lib/Catalyst/Request.pm index 643a298..9c9705e 100644 --- a/lib/Catalyst/Request.pm +++ b/lib/Catalyst/Request.pm @@ -110,7 +110,7 @@ has _body => ( sub body { my $self = shift; $self->_context->prepare_body(); - $self->_body(@_) if scalar @_; + croak 'body is a reader' if scalar @_; return blessed $self->_body ? $self->_body->body : $self->_body; } @@ -223,7 +223,7 @@ Arguments get automatically URI-unescaped for you. =head2 $req->args -Shortcut for arguments. +Shortcut for L. =head2 $req->base @@ -237,8 +237,9 @@ C then C is C. =head2 $req->body -Returns the message body of the request, unless Content-Type is -C or C. +Returns the message body of the request, as returned by L: a string, +unless Content-Type is C, C, or +C, in which case a L object is returned. =head2 $req->body_parameters @@ -300,7 +301,7 @@ Returns a reference to a hash containing the cookies. print $c->request->cookies->{mycookie}->value; -The cookies in the hash are indexed by name, and the values are L +The cookies in the hash are indexed by name, and the values are L objects. =head2 $req->header @@ -569,7 +570,7 @@ L objects. =head2 $req->uri -Returns a URI object for the current request. Stringifies to the URI text. +Returns a L object for the current request. Stringifies to the URI text. =head2 $req->mangle_params( { key => 'value' }, $appendmode); @@ -675,7 +676,10 @@ sub uri_with { =head2 $req->user Returns the currently logged in user. B, do not call, -this will be removed in version 5.81. +this will be removed in version 5.81. To retrieve the currently authenticated +user, see C<< $c->user >> and C<< $c->user_exists >> in +L. For the C provided by the +webserver, see C<< $req->remote_user >> below. =head2 $req->remote_user