- Fixed http://dev.catalyst.perl.org/ticket/62
[catagits/Catalyst-Runtime.git] / lib / Catalyst / Request.pm
index 3dfbee4..b35bc59 100644 (file)
@@ -329,7 +329,16 @@ Shortcut for $req->parameters.
 sub parameters {
     my ( $self, $params ) = @_;
     $self->{_context}->prepare_body;
-    $self->{parameters} = $params if $params;
+    if ( $params ) {
+        if ( ref $params ) {
+            $self->{parameters} = $params;
+        }
+        else {
+            $self->{_context}->log->warn( 
+                "Attempt to retrieve '$params' with req->params(), " .
+                "you probably meant to call req->param('$params')" );
+        }
+    }
     return $self->{parameters};
 }
 
@@ -356,7 +365,6 @@ sub path {
     my $path     = $self->uri->path;
     my $location = $self->base->path;
     $path =~ s/^(\Q$location\E)?//;
-    $path =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
     $path =~ s/^\///;
     $self->{path} = $path;