From: Matt S Trout Date: Tue, 21 Apr 2009 13:41:12 +0000 (+0000) Subject: pass replace_constructor when making app immutable to force installation X-Git-Tag: 5.80002~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=05d79b223fd5c1594a492fc05faca548e66478d9;hp=3e5e24e72e331f9e3c5e8754d74f52ac55de8642 pass replace_constructor when making app immutable to force installation --- diff --git a/Changes b/Changes index 92a3cc9..8ab23f1 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ # This file documents the revision history for Perl extension Catalyst. + - pass replace_constructor to the immutable call to ensure + applications get a Moose constructor rather than a C::A one + 5.80002 2009-04-21 12:21:00 - Fix issues with restarting the application class due to C3 failures on perl 5.10 (t0m) diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index eee6a00..a628d53 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1,7 +1,7 @@ package Catalyst; use Moose; -extends 'Catalyst::Component'; +extends 'Catalyst::Component', 'Class::Accessor::Fast'; use Moose::Util qw/find_meta/; use bytes; use Scope::Upper (); @@ -1099,7 +1099,7 @@ EOF # applying modifiers). Scope::Upper::reap(sub { my $meta = Class::MOP::get_metaclass_by_name($class); - $meta->make_immutable unless $meta->is_immutable; + $meta->make_immutable(replace_constructor => 1) unless $meta->is_immutable; }, Scope::Upper::SCOPE(1)); $class->setup_finalize;