debug message for params
Sebastian Riedel [Wed, 16 Mar 2005 19:20:39 +0000 (19:20 +0000)]
Changes
lib/Catalyst.pm
lib/Catalyst/Engine.pm

diff --git a/Changes b/Changes
index 3ea0b31..c9a712e 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,9 +1,12 @@
 This file documents the revision history for Perl extension Catalyst.
 
+4.27  Wed Mar 16 20:00:00 2005
+        - debug message for parameters
+
 4.26  Wed Mar 16 10:00:00 2005
         - fixed the weird bug that caused regex actions to fail on every
           second request
-        - somemore debug messages
+        - more debug messages
         - 100% pod coverage.
 
 4.25  Sat Mar 12 18:00:00 2005
index a857494..9a629fc 100644 (file)
@@ -7,7 +7,7 @@ use Catalyst::Log;
 
 __PACKAGE__->mk_classdata($_) for qw/_config log/;
 
-our $VERSION = '4.26';
+our $VERSION = '4.27';
 our @ISA;
 
 =head1 NAME
index 358a940..65cf3ed 100644 (file)
@@ -481,6 +481,15 @@ sub prepare {
     $c->log->debug(qq/"$method" request for "$path"/) if $c->debug;
     $c->prepare_action;
     $c->prepare_parameters;
+
+    if ( $c->debug && keys %{ $c->req->params } ) {
+        my @params;
+        for my $key ( keys %{ $c->req->params } ) {
+            my $value = $c->req->params->{$key};
+            push @params, "$key=$value";
+        }
+        $c->log->debug( 'Parameters are "' . join( ' ', @params ) . '"' );
+    }
     $c->prepare_uploads;
     return $c;
 }