From: Tokuhiro Matsuno Date: Tue, 9 Jun 2009 03:57:45 +0000 (+0900) Subject: latest moose inlining destructor by default X-Git-Tag: 0.24~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e578d610be7812bb5fc5c861aeee01fe9270aa2f;p=gitmo%2FMouse.git latest moose inlining destructor by default --- diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 81fb0b0..4761e5d 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -209,6 +209,7 @@ sub make_immutable { my $self = shift; my %args = ( inline_constructor => 1, + inline_destructor => 1, @_, ); diff --git a/t/000-recipes/001_point.t b/t/000-recipes/001_point.t index 3a8bd33..1f52f0f 100644 --- a/t/000-recipes/001_point.t +++ b/t/000-recipes/001_point.t @@ -6,7 +6,7 @@ use warnings; use Test::More; BEGIN { if (eval "require Class::Method::Modifiers; 1") { - plan tests => 57; + plan tests => 59; } else { plan skip_all => "Class::Method::Modifiers required for this test"; @@ -134,7 +134,7 @@ is_deeply( [ 'Mouse::Object' ], '... Point got the automagic base class'); -my @Point_methods = qw(meta new x y clear); +my @Point_methods = qw(meta new x y clear DESTROY); my @Point_attrs = ('x', 'y'); is_deeply( @@ -174,7 +174,7 @@ is_deeply( [ 'Point' ], '... Point3D gets the parent given to it'); -my @Point3D_methods = qw(new meta clear); +my @Point3D_methods = qw(new meta clear DESTROY); my @Point3D_attrs = ('z'); SKIP: { diff --git a/t/800_shikabased/013-compatibility-get_method_list.t b/t/800_shikabased/013-compatibility-get_method_list.t index e75ce26..f7b6dfa 100644 --- a/t/800_shikabased/013-compatibility-get_method_list.t +++ b/t/800_shikabased/013-compatibility-get_method_list.t @@ -30,8 +30,8 @@ sub test { } ... die $@ if $@; - is join(',', sort "${class}Class"->meta->get_method_list()), 'foo,meta'; - is join(',', sort "${class}ClassImm"->meta->get_method_list()), 'foo,meta,new'; - is join(',', sort "${class}Role"->meta->get_method_list()), 'bar'; + is join(',', sort "${class}Class"->meta->get_method_list()), 'foo,meta', "mutable $class"; + is join(',', sort "${class}ClassImm"->meta->get_method_list()), 'DESTROY,foo,meta,new', "immutable $class"; + is join(',', sort "${class}Role"->meta->get_method_list()), 'bar', "role $class"; }