From: gfx Date: Mon, 12 Oct 2009 06:29:08 +0000 (+0900) Subject: Resolve a 'failing' test, although it has some TODOs X-Git-Tag: 0.37_06~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=925ef7611f6ffc6b67b4fa5cbbbb3abe94c5f947 Resolve a 'failing' test, although it has some TODOs --- diff --git a/lib/Mouse/Meta/Role.pm b/lib/Mouse/Meta/Role.pm index 04e6cc1..a3579b6 100644 --- a/lib/Mouse/Meta/Role.pm +++ b/lib/Mouse/Meta/Role.pm @@ -188,7 +188,7 @@ sub apply { else{ # Appplication::ToInstance $args{_to} = 'instance'; - my $metaclass = $applicant->meta->create_anon_class( + my $metaclass = (Mouse::Util::class_of($applicant) || 'Mouse::Meta::Class')->create_anon_class( superclasses => [ref $applicant], cache => 1, ); diff --git a/t/020_attributes/failing/011_more_attr_delegation.t b/t/020_attributes/011_more_attr_delegation.t similarity index 97% rename from t/020_attributes/failing/011_more_attr_delegation.t rename to t/020_attributes/011_more_attr_delegation.t index 75d6fa1..15f8e6a 100644 --- a/t/020_attributes/failing/011_more_attr_delegation.t +++ b/t/020_attributes/011_more_attr_delegation.t @@ -123,6 +123,9 @@ do not fail at compile time. ); } "can't create attr with generative handles parameter and no isa"; + our $TODO; +{ + local $TODO = 'handles => CODE is not supported'; ::lives_ok { has child_d => ( isa => "ChildD", @@ -134,6 +137,7 @@ do not fail at compile time. } ); } "can't create attr with generative handles parameter and no isa"; +} ::lives_ok { has child_e => ( @@ -144,6 +148,8 @@ do not fail at compile time. ); } "can delegate to non moose class using explicit method list"; +{ + local $TODO = 'handles => CODE is not supported'; my $delegate_class; ::lives_ok { has child_f => ( @@ -158,6 +164,7 @@ do not fail at compile time. } "subrefs on non moose class give no meta"; ::is( $delegate_class, "ChildF", "plain classes are handed down to subs" ); +} ::lives_ok { has child_g => (