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

sartak at bestpractical.com sartak at bestpractical.com
Mon Aug 25 16:13:37 EDT 2008


Author: sartak
Date: Mon Aug 25 16:13:25 2008
New Revision: 15439

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

Log:
 r70295 at onn:  sartak | 2008-08-25 14:57:33 -0400
 Assign dispatcher names based on class name, instead of always Path::Dispatcher


Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher.pm	(original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher.pm	Mon Aug 25 16:13:25 2008
@@ -21,7 +21,8 @@
     default => do {
         my $i = 0;
         sub {
-            join '-', __PACKAGE__, ++$i;
+            my $self = shift;
+            join '-', blessed($self), ++$i;
         },
     },
 );
@@ -81,13 +82,13 @@
 
         RULE:
         for my $rule ($stage->rules) {
-            my $vars = $rule->match($path)
+            my $result = $rule->match($path)
                 or next;
 
             $dispatch->add_match(
                 stage  => $stage,
                 rule   => $rule,
-                result => $vars,
+                result => $result,
             );
 
             next STAGE if $stage->match_ends_stage;



More information about the Bps-public-commit mailing list