From: Matt S Trout Date: Thu, 7 Feb 2008 13:42:46 +0000 (+0000) Subject: failing test for two subclasses of the same non-Moose class with different metaclasses X-Git-Tag: 0_37~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cdeb30dc5c93d3b1b46192d2d6f2ac35763d1a4c;hp=29ed9dd92b8b5dabe0a4adbc169ddd72a46bf641;p=gitmo%2FMoose.git failing test for two subclasses of the same non-Moose class with different metaclasses --- diff --git a/t/060_compat/003_foreign_inheritence.t b/t/060_compat/003_foreign_inheritence.t index 335d892..f16ab06 100644 --- a/t/060_compat/003_foreign_inheritence.t +++ b/t/060_compat/003_foreign_inheritence.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 5; #6; +use Test::More tests => 6; #7; use Test::Exception; BEGIN { @@ -48,6 +48,26 @@ BEGIN { extends 'Bucket'; + package MyBase; + + sub foo { } + + package Custom::Meta1; + use base qw(Moose::Meta::Class); + + package Custom::Meta2; + use base qw(Moose::Meta::Class); + + package SubClass1; + use metaclass 'Custom::Meta1'; + use Moose; + + extends 'MyBase'; + + package SubClass2; + use metaclass 'Custom::Meta2'; + use Moose; + # XXX FIXME subclassing meta-attrs and immutable-ing the subclass fails } @@ -61,3 +81,7 @@ is($foo_moose->moose, 'Foo', '... got the right value from the Foo::Moose method #lives_ok { # Old::Bucket::Nose->meta->make_immutable(debug => 0); #} 'Immutability on Moose class extending Class::MOP class ok'; + +lives_ok { + SubClass2::extends('MyBase'); +} 'Can subclass the same non-Moose class twice with different metaclasses';