From: Jesse Luehrs Date: Wed, 8 Jul 2009 23:13:34 +0000 (-0500) Subject: don't delete the is option unless it's 'ro' or 'rw' X-Git-Tag: 0.04~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=883845e4c74163fd520ed46487e261800c749d06;p=gitmo%2FMooseX-SemiAffordanceAccessor.git don't delete the is option unless it's 'ro' or 'rw' --- diff --git a/lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm b/lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm index 3800bd1..5ae19f5 100644 --- a/lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm +++ b/lib/MooseX/SemiAffordanceAccessor/Role/Attribute.pm @@ -18,6 +18,7 @@ before '_process_options' => sub if ( $options->{is} eq 'ro' ) { $options->{reader} = $name; + delete $options->{is}; } elsif ( $options->{is} eq 'rw' ) { @@ -30,9 +31,8 @@ before '_process_options' => sub } $options->{writer} = $prefix . q{_} . $name; + delete $options->{is}; } - - delete $options->{is}; } };