X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FRequest.pm;h=429cadbf67dab3e1ef4b1ee7b7fae917687705d0;hp=2a03f7fa380dd89943e4e418a13cf2de5c290095;hb=83312afd857057c42c753255f804027ce3a76ce9;hpb=c23b894b1e0dda68841e82cfd85219d2627e7ac2 diff --git a/lib/Catalyst/Request.pm b/lib/Catalyst/Request.pm index 2a03f7f..429cadb 100644 --- a/lib/Catalyst/Request.pm +++ b/lib/Catalyst/Request.pm @@ -359,6 +359,21 @@ C. Previously this would have added C as another value to C (creating it if it didn't exist before), and C as another value for C. +B this is considered a legacy interface and care should be taken when +using it. C<< scalar $c->req->param( 'foo' ) >> will return only the first +C param even if multiple are present; C<< $c->req->param( 'foo' ) >> will +return a list of as many are present, which can have unexpected consequences +when writing code of the form: + + $foo->bar( + a => 'b', + baz => $c->req->param( 'baz' ), + ); + +If multiple C parameters are provided this code might corrupt data or +cause a hash initialization error. For a more straightforward interface see +C<< $c->req->parameters >>. + =cut sub param {