4 use Test::More tests => 19;
12 has 'thing' => ( is => 'rw' );
13 has '_private' => ( is => 'rw' );
19 use MooseX::SemiAffordanceAccessor;
22 has 'thing' => ( is => 'rw' );
23 has '_private' => ( is => 'rw' );
29 # Make sure load order doesn't matter
31 use MooseX::SemiAffordanceAccessor;
33 has 'thing' => ( is => 'rw' );
34 has '_private' => ( is => 'rw' );
41 use MooseX::SemiAffordanceAccessor;
43 has 'ro' => ( is => 'ro' );
44 has 'thing' => ( is => 'rw', reader => 'get_thing' );
45 has 'thing2' => ( is => 'rw', writer => 'set_it' );
49 ok( Standard->can('thing'), 'Standard->thing() exists' );
50 ok( ! Standard->can('set_thing'), 'Standard->set_thing() does not exist' );
51 ok( Standard->can('_private'), 'Standard->_private() exists' );
52 ok( ! Standard->can('_set_private'), 'Standard->_set_private() does not exist' );
54 ok( SAA->can('thing'), 'SAA->thing() exists' );
55 ok( SAA->can('set_thing'), 'SAA->set_thing() exists' );
56 ok( SAA->can('_private'), 'SAA->_private() exists' );
57 ok( SAA->can('_set_private'), 'SAA->_set_private() exists' );
59 ok( SAA2->can('thing'), 'SAA2->thing() exists' );
60 ok( SAA2->can('set_thing'), 'SAA2->set_thing() exists' );
61 ok( SAA2->can('_private'), 'SAA2->_private() exists' );
62 ok( SAA2->can('_set_private'), 'SAA2->_set_private() exists' );
64 ok( SAA3->can('ro'), 'SAA3->ro exists' );
65 ok( ! SAA3->can('set_ro'), 'SAA3->set_ro does not exist' );
66 ok( SAA3->can('thing'), 'SAA3->thing exists' );
67 ok( ! SAA3->can('set_thing'), 'SAA3->set_thing does not exist' );
68 ok( SAA3->can('thing2'), 'SAA3->thing2 exists' );
69 ok( ! SAA3->can('set_thing2'), 'SAA3->set_thing2 does not exist' );
70 ok( SAA3->can('set_it'), 'SAA3->set_it does exist' );