Commit | Line | Data |
---|---|---|
b3986722 | 1 | package ACLTestApp; |
2 | use Test::More; | |
3 | ||
4 | use strict; | |
5 | use warnings; | |
6 | use MRO::Compat; | |
7 | use Scalar::Util (); | |
8 | ||
9 | use base qw/Catalyst Catalyst::Controller/; | |
10 | use Catalyst qw//; | |
11 | ||
12 | sub execute { | |
13 | my $c = shift; | |
14 | my ( $class, $action ) = @_; | |
15 | ||
16 | if ( Scalar::Util::blessed($action) | |
17 | and $action->name ne "foobar" ) { | |
18 | eval { $c->detach( 'foobar', [$action, 'foo'] ) }; | |
19 | } | |
20 | ||
21 | $c->next::method( @_ ); | |
22 | } | |
23 | ||
24 | __PACKAGE__->setup; | |
25 | ||
26 | 1; |