From: Dave Rolsky Date: Fri, 12 Sep 2008 22:39:20 +0000 (+0000) Subject: On further examination, this test is bogus. If you subclass a Moose X-Git-Tag: 0.58~38 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=924c3670b02bb93b1e0e275f0c4e05590e338615;p=gitmo%2FMoose.git On further examination, this test is bogus. If you subclass a Moose class via "use base" and not "extends", you don't get to complain that Moose finds a metaclass incompatibility. When you call "extends" Moose explicitly fixes said incompatibility. --- diff --git a/t/050_metaclasses/017_traits_plain_subclass.t b/t/050_metaclasses/017_traits_plain_subclass.t deleted file mode 100644 index 653c017..0000000 --- a/t/050_metaclasses/017_traits_plain_subclass.t +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; - -use Test::More tests => 4; -use Test::Exception; - -SKIP: -{ - skip 'This blows up because Moose thinks the metaclasses are incompatible', 4; - -{ - package NoOpTrait; - use Moose::Role; -} - -{ - package Parent; - use Moose -traits => 'NoOpTrait'; - - has attr => ( - is => 'rw', - isa => 'Str', - ); -} - -{ - package Child; - use base 'Parent'; -} - -is(Child->meta->name, 'Child', "correct metaclass name"); - -my $child = Child->new(attr => "ibute"); -ok($child, "constructor works"); - -is($child->attr, "ibute", "getter inherited properly"); - -$child->attr("ition"); -is($child->attr, "ition", "setter inherited properly"); - -} -