X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FCDICompatTestPlugin.pm;h=f7e2d0588796fe5ce497919c6b02fd9736185e76;hp=43b4270e7c0c827be59dc79e13cc372d3b511ab5;hb=82010ea176741c7a4f2baf3f6f27377b1d9f6b15;hpb=85781ad7ed72409d08127c0c23610ecb2de5663a diff --git a/t/lib/CDICompatTestPlugin.pm b/t/lib/CDICompatTestPlugin.pm index 43b4270..f7e2d05 100644 --- a/t/lib/CDICompatTestPlugin.pm +++ b/t/lib/CDICompatTestPlugin.pm @@ -15,13 +15,28 @@ package CDICompatTestPlugin; use strict; use warnings; use base qw/Class::Accessor::Fast/; +use MRO::Compat; __PACKAGE__->mk_accessors(qw/_config/); sub setup { my $app = shift; $app->config; - $app->NEXT::setup(@_); + $app->next::method(@_); +} + +# However, if we are too enthusiastic about adding accessors to the +# MyApp package, then this method isn't called (as there is a local +# symbol already). + +# Note - use a different package here, so that Moose's +# package detection code doesn't get confused.. +$CDICompatTestPlugin::Data::HAS_RUN_SETUP_FINISHED = 0; + +sub setup_finished { + my $app = shift; + $CDICompatTestPlugin::Data::HAS_RUN_SETUP_FINISHED = 1; + $app->next::method(@_); } 1;