[Catalyst-commits] r8420 -
Catalyst-Runtime/5.80/trunk/lib/Catalyst/DispatchType
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Mon Sep 15 17:02:27 BST 2008
Author: rafl
Date: 2008-09-15 17:02:27 +0100 (Mon, 15 Sep 2008)
New Revision: 8420
Modified:
Catalyst-Runtime/5.80/trunk/lib/Catalyst/DispatchType/Chained.pm
Log:
Display unattached chained actions under -Debug.
Modified: Catalyst-Runtime/5.80/trunk/lib/Catalyst/DispatchType/Chained.pm
===================================================================
--- Catalyst-Runtime/5.80/trunk/lib/Catalyst/DispatchType/Chained.pm 2008-09-14 19:35:31 UTC (rev 8419)
+++ Catalyst-Runtime/5.80/trunk/lib/Catalyst/DispatchType/Chained.pm 2008-09-15 16:02:27 UTC (rev 8420)
@@ -71,6 +71,11 @@
[ 35, 'Path Spec' ], [ 36, 'Private' ]
);
+ my $has_unattached_actions;
+ my $unattached_actions = Text::SimpleTable->new(
+ [ 35, 'Private' ], [ 36, 'Missing parent' ],
+ );
+
ENDPOINT: foreach my $endpoint (
sort { $a->reverse cmp $b->reverse }
@{ $self->_endpoints }
@@ -92,7 +97,11 @@
$curr = $self->_actions->{$parent};
unshift(@parents, $curr) if $curr;
}
- next ENDPOINT unless $parent eq '/'; # skip dangling action
+ if ($parent ne '/') {
+ $has_unattached_actions = 1;
+ $unattached_actions->row('/'.$parents[0]->reverse, $parent);
+ next ENDPOINT;
+ }
my @rows;
foreach my $p (@parents) {
my $name = "/${p}";
@@ -110,6 +119,8 @@
}
$c->log->debug( "Loaded Chained actions:\n" . $paths->draw . "\n" );
+ $c->log->debug( "Unattached Chained actions:\n", $unattached_actions->draw . "\n" )
+ if $has_unattached_actions;
}
=head2 $self->match( $c, $path )
More information about the Catalyst-commits
mailing list