From: Tomas Doran Date: Sun, 28 Jun 2009 23:45:59 +0000 (+0000) Subject: Fix bug from RT#46459, misc cleanups in Catalyst::Test X-Git-Tag: 5.80006~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=cf1fb734a3ab53b536aac54bcb3d382c845b46a8;hp=11ff9b94b35015ba94b9fdad5f58039076d31b90 Fix bug from RT#46459, misc cleanups in Catalyst::Test --- diff --git a/Changes b/Changes index 00222a2..e4b3bea 100644 --- a/Changes +++ b/Changes @@ -3,13 +3,17 @@ Bug fixes: - Revert change to URL encode things passed into $c->uri_for Args and CaptureArgs as this causes breakage to pre-existing - applications. + applications (t0m). - Remove use of Test::MockObject as it doesn't install from CPAN - in some environments. + in some environments (t0m). - Remove use of dclone to deep copy configs and replace with Catalyst::Utils::merge_hashes which has the same effect, of ensuring child classes don't inherit their parent's config, - except works correctly with closures. + except works correctly with closures (t0m). + - Add Class::C3::reinitialize into Catalyst::Test to avoid weird + bugs in ctx_request (bokutin in RT#46459) + - Fix issues with _parse_PathPrefix_attr method in Catalyst::Controller + (jasonk in RT#42816) New features: - Use ~ as prefix for plugins or action classes which are located in @@ -20,7 +24,7 @@ references, that close over the context, without creating leaks (Florian Ragwitz). - Things t0m needs to move into an actual changelog section, after he introduced that shit: + Refactoring / cleanups: - Clean namespaces in Catalyst::Exception* (Florian Ragwitz). - Turn Catalyst::Exception into an actual class and make the throw method create instances of it. They can still be used as normal @@ -29,6 +33,9 @@ - Add a rethrow method to Catalyst::Exception (Florian Ragwitz). - Add Catalyst::Exception::Detach and ::Go, and refactor detach() and go() to use them instead of magic, global strings (Florian Ragwitz). + Fixes RT#47366 + - Clean up getting metaclass instance and making app class immutable + again in Catalyst::Test (t0m) 5.80005 2009-06-06 14:40:00 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->( @_ );