From: Dave Rolsky Date: Wed, 21 Jul 2010 00:16:00 +0000 (-0500) Subject: Tidy code X-Git-Tag: v0.04~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-FollowPBP.git;a=commitdiff_plain;h=73198536791f827c5e1d793e913b0356f4cd4de1 Tidy code --- 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; }