Commit | Line | Data |
6a8f85af |
1 | # See t/plugin_new_method_backcompat.t |
2 | package TestAppPluginWithConstructor; |
bca6bdad |
3 | use Test::More; |
6a8f85af |
4 | use Test::Exception; |
5 | use Catalyst qw/+TestPluginWithConstructor/; |
6 | use Moose; |
7 | BEGIN { extends qw/Catalyst Catalyst::Controller/ } # Ewww, FIXME. |
8 | |
9 | sub foo : Local { |
10 | my ($self, $c) = @_; |
11 | $c->res->body('foo'); |
12 | } |
13 | |
14 | __PACKAGE__->setup; |
15 | our $MODIFIER_FIRED = 0; |
16 | |
17 | lives_ok { |
18 | before 'dispatch' => sub { $MODIFIER_FIRED = 1 } |
19 | } 'Can apply method modifier'; |
20 | no Moose; |
21 | |
bca6bdad |
22 | our $IS_IMMUTABLE_YET = __PACKAGE__->meta->is_immutable; |
23 | ok !$IS_IMMUTABLE_YET, 'I am not immutable yet'; |
24 | |
6a8f85af |
25 | 1; |
26 | |