the keyword C<parameter>, but your parameters can use any options to C<has>.
parameter 'delegation' => (
- is => 'ro',
isa => 'HashRef|ArrayRef|RegexpRef',
predicate => 'has_delegation',
);
Behind the scenes, C<parameter> uses C<has> to add attributes to a parameter
-class. The arguments to C<with> are used to construct a parameter object, which
-has the attributes specified by calls to C<parameter>. The parameter object is
-then passed to...
+class (except the "is" option defaults to "ro" for convenience). The arguments
+to C<with> are used to construct a parameter object, which has the attributes
+specified by calls to C<parameter>. The parameter object is then passed to...
=head3 C<role>
can now also choose type, default value, whether it's required, B<traits>, etc.
parameter traits => (
- is => 'ro',
isa => 'ArrayRef[Str]',
default => sub { [] },
);
which attributes to dump to a file.
parameter instrument_method => (
- is => 'ro',
isa => 'Str',
required => 1,
);
states.
parameter save_intermediate => (
- is => 'ro',
isa => 'Bool',
default => 0,
);
L<Storable>. Which backend to use can be a parameter.
parameter format => (
- is => 'ro',
- isa => (enum ['Storable', 'YAML', 'JSON']),
+ isa => (enum ['Storable', 'YAML', 'JSON']),
default => 'Storable',
);