6 use Test::More tests => 10;
15 http://www.gwydiondylan.org/books/drm/Instance_Creation_and_Initialization#HEADING43-37
25 has 'bar' => (is => 'ro', isa => 'Str', default => 'Foo::bar');
34 has '+bar' => (default => 'Bar::bar');
40 is($foo->bar, 'Foo::bar', '... got the right default value');
42 dies_ok { $foo->bar(10) } '... Foo::bar is a read/only attr';
48 is($bar->bar, 'Bar::bar', '... got the right default value');
50 dies_ok { $bar->bar(10) } '... Bar::bar is a read/only attr';
52 # check some meta-stuff
54 ok(Bar->meta->has_attribute('bar'), '... Bar has a bar attr');
55 isnt(Foo->meta->get_attribute('bar'),
56 Bar->meta->get_attribute('bar'),
57 '... Foo and Bar have different copies of bar');