X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FActionChain.pm;h=1518802f8280d6d1e4431b7073b4fc933f435b41;hp=9ef1513686f60d4a4b37857b0a33d1ecf1275cfc;hb=ae29b412955743885e80350085167b54b69672da;hpb=e16a6c4e6c4d49e73b5286b3186616af14f3f554 diff --git a/lib/Catalyst/ActionChain.pm b/lib/Catalyst/ActionChain.pm index 9ef1513..1518802 100644 --- a/lib/Catalyst/ActionChain.pm +++ b/lib/Catalyst/ActionChain.pm @@ -1,8 +1,11 @@ package Catalyst::ActionChain; -use strict; -use base qw/Catalyst::Action/; +use Moose; +extends qw(Catalyst::Action); +has chain => (is => 'rw'); + +no Moose; =head1 NAME @@ -20,22 +23,6 @@ the actions in the chain in order. =cut -__PACKAGE__->mk_accessors(qw/chain/); - -use overload ( - - # Stringify to reverse for debug output etc. - q{""} => sub { shift->{reverse} }, - - # Codulate to execute to invoke the encapsulated action coderef - '&{}' => sub { my $self = shift; sub { $self->execute(@_); }; }, - - # Make general $stuff still work - fallback => 1, - -); - - sub dispatch { my ( $self, $c ) = @_; my @captures = @{$c->req->captures||[]}; @@ -58,6 +45,7 @@ sub from_chain { return $self->new({ %$final, chain => $actions }); } +__PACKAGE__->meta->make_immutable; 1; __END__ @@ -79,6 +67,10 @@ actions in order. Takes a list of Catalyst::Action objects and constructs and returns a Catalyst::ActionChain object representing a chain of these actions +=head2 meta + +Provided by Moose + =head1 AUTHORS Catalyst Contributors, see Catalyst.pm