use strictures 1;
use Test::More;
+use Test::Fatal;
my @result;
reader => 'get_one',
writer => 'set_one',
);
+
+ sub one {'sub'}
}
{
is( $foo->get_one, 'lol', 'reader works' );
$foo->set_one('rofl');
is( $foo->get_one, 'rofl', 'writer works' );
+is( $foo->one, 'sub', 'reader+writer = no accessor' );
-ok( !eval { $foo->get_one('blah'); 1 }, 'reader dies on write' );
+ok( exception { $foo->get_one('blah') }, 'reader dies on write' );
is( $bar->TWO, '...', 'accessor works for reading' );
$bar->TWO('!!!');