X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-FollowPBP.git;a=blobdiff_plain;f=lib%2FMooseX%2FFollowPBP%2FRole%2FAttribute.pm;h=db3e385312904c2d2e531564b3274aed901d5cce;hp=31ec0614ed8c3cfc4f036981f15f0ac551b352c6;hb=73198536791f827c5e1d793e913b0356f4cd4de1;hpb=4d5463e9cf1d094e89c13637c230482e4e626a90 diff --git a/lib/MooseX/FollowPBP/Role/Attribute.pm b/lib/MooseX/FollowPBP/Role/Attribute.pm index 31ec061..db3e385 100644 --- a/lib/MooseX/FollowPBP/Role/Attribute.pm +++ b/lib/MooseX/FollowPBP/Role/Attribute.pm @@ -5,34 +5,28 @@ use warnings; use Moose::Role; - -before '_process_options' => sub -{ +before _process_options => sub { my $class = shift; my $name = shift; my $options = shift; - if ( exists $options->{is} && - ! ( exists $options->{reader} || exists $options->{writer} ) ) - { + if ( exists $options->{is} + && !( exists $options->{reader} || exists $options->{writer} ) ) { my $get; my $set; - if ( $name =~ s/^_// ) - { + if ( $name =~ s/^_// ) { $get = '_get_'; $set = '_set_'; } - else - { + else { $get = 'get_'; $set = 'set_'; } $options->{reader} = $get . $name; - if ( $options->{is} eq 'rw' ) - { + if ( $options->{is} eq 'rw' ) { $options->{writer} = $set . $name; }