4 use Test::More tests => 10;
22 ok(!Class->can('x'), "No accessor is injected if 'is' has no value");
23 can_ok('Class', 'y', 'z');
25 my $object = Class->new;
27 ok(!$object->can('x'), "No accessor is injected if 'is' has no value");
28 can_ok($object, 'y', 'z');
30 is($object->y, undef);
34 } qr/Cannot assign a value to a read-only accessor/;
36 is($object->y, undef);
38 is($object->z, undef);
39 is($object->z(10), 10);