b663ae50a361a9381009ccdbfe76b98c2a4b7dd2
[catagits/Catalyst-Runtime.git] / t / lib / CAFCompatTestPlugin.pm
1 package CAFCompatTestPlugin;
2
3 # This plugin specificially tests an edge case of CAF compat,
4 # where you load a plugin which uses base CAF, and then override
5 # a core catalyst accessor (_config in this case)..
6
7 # This is what happens if you use the authentication back-compat
8 # stuff, as C::A::Plugin::Credential::Password is added to the plugin
9 # list, and the base C::A::C::P class, does the mk_accessors, and
10 # then the C::P::A class calls the config method before setup finishes...
11
12 use strict;
13 use warnings;
14
15 # Note that we don't actually _really_ use CAF here, as MX::Adopt::CAF
16 # is in place...
17 use base qw/Class::Accessor::Fast/;
18
19 BEGIN {
20     __PACKAGE__->mk_accessors(qw/_config/);
21 }
22
23 sub setup {
24     my $app = shift;
25
26     $app->config;
27     $app->NEXT::setup(@_);
28 }
29
30 1;