6 use Test::More tests => 8;
12 This tests a bug sent via RT #27329
20 Foo->meta->add_attribute('foo' => (
28 my $foo = Foo->meta->new_object;
31 is($foo->get_foo, 'BAR', '... got the right default value');
34 my $clone = $foo->meta->clone_object($foo, foo => 'BAZ');
35 isa_ok($clone, 'Foo');
36 isnt($clone, $foo, '... and it is a clone');
38 is($clone->get_foo, 'BAZ', '... got the right cloned value');
42 my $clone = $foo->meta->clone_object($foo, foo => undef);
43 isa_ok($clone, 'Foo');
44 isnt($clone, $foo, '... and it is a clone');
46 ok(!defined($clone->get_foo), '... got the right cloned value');