X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FRequest.pm;h=b8d05b4cd2edf9b21a9aac60c2cfacaf4b27379f;hb=e5cd6cc061d87d09a29fe67c7c3ab8fc386a5af0;hp=d2c1c7f9c31d51210873899f4b1ab7b8a15a27f0;hpb=a7d2a53019cca4a6ebd29ccfc31139697f0dfdb8;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Request.pm b/lib/Catalyst/Request.pm index d2c1c7f..b8d05b4 100644 --- a/lib/Catalyst/Request.pm +++ b/lib/Catalyst/Request.pm @@ -141,7 +141,8 @@ has uploads => ( has parameters => ( is => 'rw', lazy => 1, - builder => 'prepare_parameters', + builder => '_build_parameters', + clearer => '_clear_parameters', ); # TODO: @@ -154,6 +155,14 @@ has parameters => ( sub prepare_parameters { my ( $self ) = @_; + $self->_clear_parameters; + return $self->parameters; +} + + + +sub _build_parameters { + my ( $self ) = @_; my $parameters = {}; my $body_parameters = $self->body_parameters; my $query_parameters = $self->query_parameters; @@ -870,7 +879,8 @@ request method, hostname requested etc. Ensures that the body has been parsed, then builds the parameters, which are combined from those in the request and those in the body. -This method is the builder for the 'parameters' attribute. +If parameters have already been set will clear the parameters and build them again. + =head2 meta