projects
/
catagits/Catalyst-Runtime.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
Make ActionChain stringify to its part attribute.
[catagits/Catalyst-Runtime.git]
/
lib
/
Catalyst
/
ActionContainer.pm
diff --git
a/lib/Catalyst/ActionContainer.pm
b/lib/Catalyst/ActionContainer.pm
index
2f98be1
..
5be7292
100644
(file)
--- 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};