From: Florian Ragwitz Date: Wed, 22 Apr 2009 22:44:46 +0000 (+0000) Subject: Fix the unattached chain debug table for endpoints with no parents at all. X-Git-Tag: 5.80003~40 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=59d5a63860b7506d4f5542c2774163cad745a27a;hp=586c57d99badfbf772877206564f7041adb03ea9 Fix the unattached chain debug table for endpoints with no parents at all. --- diff --git a/Changes b/Changes index 27b5d4d..f6f2360 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ # This file documents the revision history for Perl extension Catalyst. + - Fix the unattached chain debug table for endpoints with no + parents at all. (rafl) - Turn of test aggregation by default. Only aggregate if the AGGREGATE_TESTS environment variable is set and a recent Test::Aggregate is available. (rafl) diff --git a/lib/Catalyst/DispatchType/Chained.pm b/lib/Catalyst/DispatchType/Chained.pm index 23fc307..585bf3f 100644 --- a/lib/Catalyst/DispatchType/Chained.pm +++ b/lib/Catalyst/DispatchType/Chained.pm @@ -112,7 +112,7 @@ sub list { } if ($parent ne '/') { $has_unattached_actions = 1; - $unattached_actions->row('/'.$parents[0]->reverse, $parent); + $unattached_actions->row('/' . ($parents[0] || $endpoint)->reverse, $parent); next ENDPOINT; } my @rows; @@ -345,7 +345,7 @@ sub uri_for_action { return undef if @captures; # fail for too many captures return join('/', '', @parts); - + } =head2 $c->expand_action($action)