From: Sebastian Riedel Date: Sun, 13 Nov 2005 01:14:29 +0000 (+0000) Subject: Fixed debug messages X-Git-Tag: 5.7099_04~937 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=e3a1377127efe66e918a24b9fa5275a3d2aa51e0 Fixed debug messages --- diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 49c0175..33e88db 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -353,8 +353,8 @@ sub component { my @names = ( $name, "${appclass}::${name}", - map { "${appclass}::${_}::${name}" } - qw/Model M Controller C View V/ + map { "${appclass}::${_}::${name}" } + qw/Model M Controller C View V/ ); foreach my $try (@names) { @@ -1201,14 +1201,15 @@ sub prepare { # On-demand parsing $c->prepare_body unless $c->config->{parse_on_demand}; - $c->prepare_action; my $method = $c->req->method || ''; my $path = $c->req->path || ''; my $address = $c->req->address || ''; - $c->log->debug(qq/"$method" request for "$path" from $address/) + $c->log->debug(qq/"$method" request for "$path" from "$address"/) if $c->debug; + $c->prepare_action; + return $c; } diff --git a/lib/Catalyst/Dispatcher.pm b/lib/Catalyst/Dispatcher.pm index 070f084..7ba40cc 100644 --- a/lib/Catalyst/Dispatcher.pm +++ b/lib/Catalyst/Dispatcher.pm @@ -198,6 +198,9 @@ sub prepare_action { unshift @args, pop @path; } + $c->log->debug( 'Path is "' . $c->req->match . '"' ) + if ( $c->debug && $c->req->match ); + $c->log->debug( 'Arguments are "' . join( '/', @args ) . '"' ) if ( $c->debug && @args ); }