[Bps-public-commit] r16935 - in Path-Dispatcher/trunk: lib/Path/Dispatcher

sartak at bestpractical.com sartak at bestpractical.com
Wed Nov 19 15:53:36 EST 2008


Author: sartak
Date: Wed Nov 19 15:53:34 2008
New Revision: 16935

Modified:
   Path-Dispatcher/trunk/   (props changed)
   Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule.pm

Log:
 r75827 at onn:  sartak | 2008-11-19 15:53:31 -0500
 Cleanup


Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule.pm	(original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher/Rule.pm	Wed Nov 19 15:53:34 2008
@@ -70,23 +70,25 @@
 }
 
 sub trace {
-    my $self = shift;
-    my %args = @_;
+    my $self  = shift;
+    my %args  = @_;
+
     my $match = $args{match};
+    my $path  = $match ? $match->path->path : $args{path}->path;
 
     my $trace = "$self";
     $trace .= " (" . $self->name . ")" if $self->has_name;
 
     if ($args{running}) {
-        $trace .= " running codeblock with path (" . $match->path->path . ")";
+        $trace .= " running codeblock with path ($path)";
     }
     elsif ($match) {
-        $trace .= " matched against (" . $match->path->path . ")";
+        $trace .= " matched against ($path)";
         $trace .= " with (" . $match->leftover . ") left over"
             if length($match->leftover);
     }
     else {
-        $trace .= " did not match against (" . $args{path} . ")";
+        $trace .= " did not match against ($path)";
     }
 
     $trace .= ".\n";



More information about the Bps-public-commit mailing list