fixup for relative Chained from namespace '' (root)
Matt S Trout [Sun, 27 Aug 2006 13:48:19 +0000 (13:48 +0000)]
Changes
lib/Catalyst/DispatchType/Chained.pm

diff --git a/Changes b/Changes
index aa16c6f..c0683c1 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
 This file documents the revision history for Perl extension Catalyst.
 
+5.7002
+        - unescape captures to match args
+        - fix for relative Chained under namespace '' (root)
+
 5.7001   2006-07-19 23:46:54
         - fix for component loading
         - uri_for and uri_with now behave as they used to with non-
index c22604b..10342b9 100644 (file)
@@ -192,7 +192,11 @@ sub register {
         if ($parent eq '.') {
             $parent = '/'.$action->namespace;
         } elsif ($parent !~ m/^\//) {
-            $parent = '/'.join('/', $action->namespace, $parent);
+            if ($action->namespace) {
+                $parent = '/'.join('/', $action->namespace, $parent);
+            } else {
+                $parent = '/'.$parent; # special case namespace '' (root)
+            }
         }
     } else {
         $parent = '/'