Fixed debug messages
Sebastian Riedel [Sun, 13 Nov 2005 01:14:29 +0000 (01:14 +0000)]
lib/Catalyst.pm
lib/Catalyst/Dispatcher.pm

index 49c0175..33e88db 100644 (file)
@@ -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;
 }
 
index 070f084..7ba40cc 100644 (file)
@@ -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 );
 }