Unicode plugin - rework exception handler
[catagits/Catalyst-Runtime.git] / t / lib / ACLTestApp.pm
1 package ACLTestApp;
2 use Test::More;
3
4 use strict;
5 use warnings;
6 use MRO::Compat;
7 use Scalar::Util ();
8 use TestLogger;
9
10 use base qw/Catalyst Catalyst::Controller/;
11 use Catalyst qw//;
12
13 __PACKAGE__->log(TestLogger->new);
14
15 sub execute {
16     my $c = shift;
17     my ( $class, $action ) = @_;
18
19     if ( Scalar::Util::blessed($action)
20          and $action->name ne "foobar" ) {
21         eval { $c->detach( 'foobar', [$action, 'foo'] ) };
22     }
23
24     $c->next::method( @_ );
25 }
26
27 __PACKAGE__->setup;
28
29 1;