From: gfx Date: Mon, 16 Nov 2009 01:58:54 +0000 (+0900) Subject: Change inline_constructor => 0 X-Git-Tag: 0.40_06~15 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6423ed47a3392af0da9cd37ac8519583e51feb27;p=gitmo%2FMouse.git Change inline_constructor => 0 --- diff --git a/lib/Mouse.pm b/lib/Mouse.pm index 0765630..a0c88d7 100644 --- a/lib/Mouse.pm +++ b/lib/Mouse.pm @@ -141,7 +141,7 @@ sub init_meta { }); $meta->superclasses($base_class) - unless $meta->superclasses; + unless $class->isa($base_class); # make a class type for each Mouse class Mouse::Util::TypeConstraints::class_type($class) diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 8183a96..38d3153 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -11,7 +11,7 @@ our @ISA = qw(Mouse::Meta::Module); sub method_metaclass() { 'Mouse::Meta::Method' } sub attribute_metaclass() { 'Mouse::Meta::Attribute' } -sub constructor_class(); # XS +sub constructor_class() { 'Mouse::Meta::Method::Constructor' } sub destructor_class() { 'Mouse::Meta::Method::Destructor' } sub _construct_meta { @@ -191,7 +191,7 @@ sub clone_instance { sub make_immutable { my $self = shift; my %args = ( - inline_constructor => 1, + inline_constructor => 0, inline_destructor => 1, constructor_name => 'new', @_, diff --git a/lib/Mouse/PurePerl.pm b/lib/Mouse/PurePerl.pm index e50b57a..ecc61e1 100644 --- a/lib/Mouse/PurePerl.pm +++ b/lib/Mouse/PurePerl.pm @@ -203,7 +203,6 @@ sub add_method { package Mouse::Meta::Class; -sub constructor_class() { 'Mouse::Meta::Method::Constructor' } sub is_anon_class{ return exists $_[0]->{anon_serial_id}; diff --git a/t/001_mouse/813-compatibility-get_method_list.t b/t/001_mouse/813-compatibility-get_method_list.t index 4b5b124..1484384 100644 --- a/t/001_mouse/813-compatibility-get_method_list.t +++ b/t/001_mouse/813-compatibility-get_method_list.t @@ -15,7 +15,7 @@ use Test::More tests => 6; use Mouse; sub foo { } no Mouse; - __PACKAGE__->meta->make_immutable(); + __PACKAGE__->meta->make_immutable(inline_constructor => 1); } { package MouseRole; diff --git a/xs-src/Mouse.xs b/xs-src/Mouse.xs index e518b03..b167206 100644 --- a/xs-src/Mouse.xs +++ b/xs-src/Mouse.xs @@ -398,8 +398,6 @@ MODULE = Mouse PACKAGE = Mouse::Meta::Class BOOT: INSTALL_SIMPLE_READER(Class, roles); INSTALL_SIMPLE_PREDICATE_WITH_KEY(Class, is_anon_class, anon_serial_id); - newCONSTSUB(gv_stashpvs("Mouse::Meta::Class", TRUE), "constructor_class", - newSVpvs("Mouse::Meta::Method::Constructor::XS")); void linearized_isa(SV* self) @@ -470,16 +468,3 @@ CODE: } OUTPUT: RETVAL - -MODULE = Mouse PACKAGE = Mouse::Meta::Method::Constructor::XS - -CV* -_generate_constructor(...) -CODE: -{ - RETVAL = get_cvs("Mouse::Object::new", TRUE); - SvREFCNT_inc_simple_void_NN(RETVAL); -} -OUTPUT: - RETVAL -