X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=c7b8bceb5c5ac3e605f37804fa6312809cdf9449;hb=fd5fb3a83e89bd8d5872be6e8cff921a3bb02e78;hp=aa9892699c15f98742ec1064144aea95734f9809;hpb=3efd4eb3c8b9b735b4671fcf6f0bced1f6e81a85;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index aa98926..c7b8bce 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -65,6 +65,8 @@ sub _build_request_constructor_args { my %p = ( _log => $self->log ); $p{_uploadtmp} = $self->_uploadtmp if $self->_has_uploadtmp; $p{data_handlers} = {$self->registered_data_handlers}; + $p{_use_hash_multivalue} = $self->config->{use_hash_multivalue_in_request} + if $self->config->{use_hash_multivalue_in_request}; \%p; } @@ -118,7 +120,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.90049_003'; +our $VERSION = '5.90049_004'; sub import { my ( $class, @arguments ) = @_; @@ -3397,6 +3399,26 @@ In the future this might become the default behavior. =item * +C + +In L the methods C, C +and C return a hashref where values might be scalar or an arrayref +depending on the incoming data. In many cases this can be undesirable as it +leads one to writing defensive code like the following: + + my ($val) = ref($c->req->parameters->{a}) ? + @{$c->req->parameters->{a}} : + $c->req->parameters->{a}; + +Setting this configuration item to true will make L populate the +attributes underlying these methods with an instance of L +which is used by L and others to solve this very issue. You +may prefer this behavior to the default, if so enable this option (be warned +if you enable it in a legacy application we are not sure if it is completely +backwardly compatible). + +=item * + C - See L. =item *