From: Matt S Trout Date: Sun, 27 Aug 2006 13:48:19 +0000 (+0000) Subject: fixup for relative Chained from namespace '' (root) X-Git-Tag: 5.7099_04~360 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=7f64ae17316627bb574a9689955bd85bf8dd7518 fixup for relative Chained from namespace '' (root) --- diff --git a/Changes b/Changes index aa16c6f..c0683c1 100644 --- 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- diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index c22604b..10342b9 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -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 = '/'