X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FRequest.pm;h=4f9d7dc4fea57aa4da9999fed220cdbc2b188ae2;hb=e99ec2dcc083716c88a86a89b9017c6a78a260a9;hp=c859fd27af793fcc6f03570d942f14bfdefe55f1;hpb=ae29b412955743885e80350085167b54b69672da;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Request.pm b/lib/Catalyst/Request.pm index c859fd2..4f9d7dc 100644 --- a/lib/Catalyst/Request.pm +++ b/lib/Catalyst/Request.pm @@ -76,15 +76,19 @@ has parameters => ( default => sub { {} }, ); -before parameters => sub { - my ($self, $params) = @_; - if ( $params && !ref $params ) { - $self->_context->log->warn( - "Attempt to retrieve '$params' with req->params(), " . - "you probably meant to call req->param('$params')" ); - $params = undef; - } - +around parameters => sub { + my ($orig, $self, $params) = @_; + if ($params) { + if ( !ref $params ) { + $self->_context->log->warn( + "Attempt to retrieve '$params' with req->params(), " . + "you probably meant to call req->param('$params')" + ); + $params = undef; + } + return $self->$orig($params); + } + $self->$orig(); }; has base => (