6 use Test::More tests => 9;
14 This tests a bug sent via RT #27329
22 Foo->meta->add_attribute('foo' => (
30 my $foo = Foo->meta->new_object;
33 is($foo->get_foo, 'BAR', '... got the right default value');
36 my $clone = $foo->meta->clone_object($foo, foo => 'BAZ');
37 isa_ok($clone, 'Foo');
38 isnt($clone, $foo, '... and it is a clone');
40 is($clone->get_foo, 'BAZ', '... got the right cloned value');
44 my $clone = $foo->meta->clone_object($foo, foo => undef);
45 isa_ok($clone, 'Foo');
46 isnt($clone, $foo, '... and it is a clone');
48 ok(!defined($clone->get_foo), '... got the right cloned value');