X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FAction.pm;h=1a23b16b7f978f3ccecab9dda06d5ea7985f9943;hp=b42653075f0dd4e50e059375a43d36b18568cd29;hb=afb82794328ff8da1efc0a4c37f3f3703c262c31;hpb=6f1f968a6bc42bf4a4b50a1ee22d3aaecd801876 diff --git a/lib/Catalyst/Action.pm b/lib/Catalyst/Action.pm index b426530..1a23b16 100644 --- a/lib/Catalyst/Action.pm +++ b/lib/Catalyst/Action.pm @@ -17,8 +17,6 @@ L subclasses. =cut -use MRO::Compat; -use mro 'c3'; use Moose; has class => (is => 'rw'); @@ -30,6 +28,21 @@ has code => (is => 'rw'); no Moose; +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, + +); + + + no warnings 'recursion'; #__PACKAGE__->mk_accessors(qw/class namespace reverse attributes name code/);