X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FTest.pm;h=3b319ed2b23d1e518d65af94244acea349906dfe;hb=94f74acdfa62a94db80eb08f12078f0e0d513fc3;hp=10d16cae284b8885062eae6e0fc6f2d028ab8a5e;hpb=702729f5b5cc59e387ec637e543ab6ef635bd0f2;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst/Test.pm b/lib/Catalyst/Test.pm index 10d16ca..3b319ed 100644 --- a/lib/Catalyst/Test.pm +++ b/lib/Catalyst/Test.pm @@ -49,13 +49,13 @@ my $build_exports = sub { ### hook into 'dispatch' -- the function gets called after all plugins ### have done their work, and it's an easy place to capture $c. - my $meta = $class->meta; + my $meta = Class::MOP::get_metaclass_by_name($class); $meta->make_mutable; $meta->add_after_method_modifier( "dispatch", sub { $c = shift; }); - $meta->make_immutable; - + $meta->make_immutable( replace_constructor => 1 ); + Class::C3::reinitialize(); # Fixes RT#46459, I've failed to write a test for how/why, but it does. ### do the request; C::T::request will know about the class name, and ### we've already stopped it from doing remote requests above. my $res = $request->( @_ );