From 9a1a527fb3f1291e2187d38d77784844a2e27ee2 Mon Sep 17 00:00:00 2001 From: Jason May Date: Thu, 7 May 2009 21:59:14 -0400 Subject: failing test for subclassing a mx-nonmoose-using module --- t/023-FOREIGNBUILDARGS.t | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 't') diff --git a/t/023-FOREIGNBUILDARGS.t b/t/023-FOREIGNBUILDARGS.t index 1434c76..7967fdb 100644 --- a/t/023-FOREIGNBUILDARGS.t +++ b/t/023-FOREIGNBUILDARGS.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 8; +use Test::More tests => 9; package Foo; @@ -46,6 +46,15 @@ sub BUILDARGS { return { bar => shift }; } +# XXX XXX XXX +package Baz::Moose; +use Moose; +extends 'Bar::Moose'; + +has baz => ( + is => 'rw', +); + package main; my $foo = Foo::Moose->new(foo => 'bar'); @@ -62,3 +71,9 @@ is($foo->foo, 'bar', 'subclass constructor gets the right args (immutable)'); is($foo->foo_base, 'bar_base', 'subclass constructor gets the right args (immutable)'); is($bar->bar, 'baz', 'subclass constructor gets the right args (immutable)'); is($bar->foo_base, 'baz_base', 'subclass constructor gets the right args (immutable)'); + +TODO: { + todo_skip "can't extend classes that use FOREIGNBUILDARGS yet", 1; + my $baz = Baz::Moose->new('bazbaz'); + is($baz->bar, 'bazbaz_base', 'extensions of extensions of the nonmoose class respect FOREIGNBUILDARGS'); +} -- cgit v1.2.3