Commit | Line | Data |
e476d78d |
1 | package MooseX::Role::Parameterized::Meta::Parameter; |
2 | use Moose; |
3 | extends 'Moose::Meta::Attribute'; |
4 | |
96bc1fff |
5 | # This doesn't actually do anything because _process_options does not consult |
6 | # the default value of "is". hrm. |
7 | has '+is' => ( |
8 | default => 'ro', |
9 | ); |
10 | |
11 | around _process_options => sub { |
12 | my $orig = shift; |
13 | my ($class, $name, $options) = @_; |
14 | |
15 | $options->{is} ||= 'ro'; |
16 | |
17 | $orig->(@_); |
18 | }; |
e476d78d |
19 | |
a3af3850 |
20 | __PACKAGE__->meta->make_immutable( |
21 | inline_constructor => 1, |
22 | constructor_name => "_new", |
23 | ); |
e476d78d |
24 | no Moose; |
25 | |
26 | 1; |
27 | |