Fix the CDI issue, Plugin::Auth's tests now blow up a different way..
[catagits/Catalyst-Runtime.git] / t / cdi_backcompat_plugin_accessor_override.t
CommitLineData
85781ad7 1use strict;
2use warnings;
3use lib 't/lib';
4
5use Test::More tests => 1;
6use Test::Exception;
7
8# Force a stack trace.
9use Carp;
10$SIG{__DIE__} = \&Carp::confess;
11
12{
13 package CDICompatTestApp;
14 use Catalyst qw/
15 +CDICompatTestPlugin
16 /;
17 # Calling ->config here (before we call setup). With CDI/Cat 5.70 this
18 # causes *CDICompatTestApp::_config to have a class data accessor created.
19
20 # If this doesn't happen, then later when we've added CDICompatTestPlugin
21 # to @ISA, we fail in the overridden ->setup method when we call ->config
22 # again, as we get the CAF accessor from CDICompatTestPlugin, not the one
23 # created in this package as a side-effect of this call. :-(
24 __PACKAGE__->config;
25}
26
8a440eba 27lives_ok {
28 CDICompatTestApp->setup;
29} 'Setup app with plugins which says use base qw/Class::Accessor::Fast/';
30