Stop using "has +" in roles, especially since it wasn't doing anything anyway
[gitmo/MooseX-HasDefaults.git] / lib / MooseX / HasDefaults / Meta / IsRO.pm
CommitLineData
e24f444c 1package MooseX::HasDefaults::Meta::IsRO;
0413c7e1 2use Moose::Role;
3
0413c7e1 4around _process_options => sub {
5 my $orig = shift;
6 my (undef, undef, $options) = @_;
7
8 if (!exists($options->{is})) {
9 $options->{is} = 'ro';
10 }
11 # They want no accessor, but Moose doesn't like "is => undef"
12 elsif (!defined($options->{is})) {
13 delete $options->{is};
14 }
15
16 $orig->(@_);
17};
18
191;
20