From: Florian Ragwitz Date: Mon, 8 Sep 2008 13:26:21 +0000 (+0000) Subject: Make ActionChain stringify to its part attribute. X-Git-Tag: 5.8000_03~68 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=9b73c5e7de3ab235f6967658e4096e9057572771 Make ActionChain stringify to its part attribute. This is used in the listing of private actions in debug mode. --- diff --git a/lib/Catalyst/ActionContainer.pm b/lib/Catalyst/ActionContainer.pm index 2f98be1..5be7292 100644 --- a/lib/Catalyst/ActionContainer.pm +++ b/lib/Catalyst/ActionContainer.pm @@ -27,6 +27,11 @@ around new => sub { no Moose; +use overload ( + # Stringify to path part for tree search + q{""} => sub { shift->part }, +); + sub get_action { my ( $self, $name ) = @_; return $self->actions->{$name} if defined $self->actions->{$name};