Merge branch 'master' into gsoc_breadboard
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Request.pm
index d2c1c7f..b8d05b4 100644 (file)
@@ -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