#!/usr/bin/env perl
use strict;
use warnings;
-use Test::More tests => 12;
+use Test::More tests => 13;
use Test::Exception;
use MooseX::Role::Parameterized::Parameters;
is($p->length, 5, "correct length");
+throws_ok {
+ $p->length(10);
+} qr/^Cannot assign a value to a read-only accessor/;
+
do {
package MyRole::LengthParameter;
use MooseX::Role::Parameterized;