28 default => sub { Foo->new() },
31 }, undef, '... can create the attribute with delegations' );
38 }, undef, '... created the object ok' );
41 is($bar->a, 'Foo::a', '... got the right delgated value');
44 $SIG{__WARN__} = sub { push @w, "@_" };
54 default => sub { Foo->new() },
57 }, undef, '... can create the attribute with delegations' );
61 is(@w, 0, "no warnings");
67 }, undef, '... created the object ok' );
70 is($baz->a, 'Foo::a', '... got the right delgated value');
87 default => sub { Foo->new() },
88 handles => [qw(a new)],
90 }, undef, '... can create the attribute with delegations' );
95 local $TODO = "warning not yet implemented";
97 is(@w, 1, "one warning");
98 like($w[0], qr/not delegating.*new/i, "warned");
106 }, undef, '... created the object ok' );
107 isa_ok($blart, 'Blart');
109 is($blart->a, 'Foo::a', '... got the right delgated value');