use strict;
use warnings;
-use Test::More tests => 27;
+use Test::More tests => 28;
use Test::Exception;
BEGIN {
is($point->x, 2, '... the $.x attribute was initialized correctly through the metaobject');
-$point->x(42);
+dies_ok {
+ $point->x(42);
+} '... cannot write to a read-only accessor';
is($point->x, 2, '... the $.x attribute was not altered');
$point->clear();