X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FRequest.pm;h=4f9d7dc4fea57aa4da9999fed220cdbc2b188ae2;hb=b7abc49bf218dc608a6266535d0ff555ae31a368;hp=c859fd27af793fcc6f03570d942f14bfdefe55f1;hpb=f263fa9a3be935b736f5d901316565662387c41b;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 => (