merge in new test actions.
Marcus Ramberg [Mon, 8 Sep 2008 20:43:51 +0000 (20:43 +0000)]
lib/Catalyst/ActionContainer.pm

index bb1bbac..5be7292 100644 (file)
@@ -17,7 +17,7 @@ to represent the various dispatch points in your application.
 
 use Moose;
 
-has part => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
+has part => (is => 'rw', required => 1);
 has actions => (is => 'rw', required => 1, lazy => 1, default => sub { {} });
 
 around new => sub {
@@ -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};