X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=t%2Flib%2FCDICompatTestPlugin.pm;fp=t%2Flib%2FCDICompatTestPlugin.pm;h=cc7df1c0d7cccbdfe7b7a5952db27a7519404013;hp=470373c0e4a2c5283e9ef32a1d9e5a3bb987bf81;hb=df3ea11bb1ad740663f2a4c909fba71612aa6a48;hpb=5baa3bbcb8bea403665bceaa82f819905f0b501f diff --git a/t/lib/CDICompatTestPlugin.pm b/t/lib/CDICompatTestPlugin.pm index 470373c..cc7df1c 100644 --- a/t/lib/CDICompatTestPlugin.pm +++ b/t/lib/CDICompatTestPlugin.pm @@ -25,4 +25,18 @@ sub 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::AS_RUN_SETUP_FINISHED = 1; + $app->next::method(@_); +} + 1;