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

sartak at bestpractical.com sartak at bestpractical.com
Wed Nov 19 13:41:18 EST 2008


Author: sartak
Date: Wed Nov 19 13:41:18 2008
New Revision: 16931

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

Log:
 r75823 at onn:  sartak | 2008-11-19 13:41:14 -0500
 Don't require under rules be named when naming subrules


Modified: Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm
==============================================================================
--- Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm	(original)
+++ Path-Dispatcher/trunk/lib/Path/Dispatcher/Declarative.pm	Wed Nov 19 13:41:18 2008
@@ -198,7 +198,12 @@
     if (!defined(wantarray)) {
         if ($UNDER_RULE) {
             $UNDER_RULE->add_rule($rule);
-            $rule->name($UNDER_RULE->name . " (rule $rule_name)");
+
+            my $full_name = $UNDER_RULE->has_name
+                          ? $UNDER_RULE->name . " (rule $rule_name)"
+                          : "anonymous Under (rule $rule_name)";
+
+            $rule->name($full_name);
         }
         else {
             $self->dispatcher->add_rule($rule);



More information about the Bps-public-commit mailing list