X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FTest.pm;h=75821bf15bb3ee9849d2057f67e82089487c4ca4;hp=10d16cae284b8885062eae6e0fc6f2d028ab8a5e;hb=cf1fb734a3ab53b536aac54bcb3d382c845b46a8;hpb=11ff9b94b35015ba94b9fdad5f58039076d31b90 diff --git a/lib/Catalyst/Test.pm b/lib/Catalyst/Test.pm index 10d16ca..75821bf 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(); ### 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->( @_ );