1 package MooseX::FollowPBP::Role::Attribute;
8 before _process_options => sub {
13 if ( exists $options->{is}
14 && !( exists $options->{reader} || exists $options->{writer} ) ) {
18 if ( $name =~ s/^_// ) {
27 $options->{reader} = $get . $name;
29 if ( $options->{is} eq 'rw' ) {
30 $options->{writer} = $set . $name;
33 delete $options->{is};
43 Moose::Util::MetaRole::apply_metaclass_roles
44 ( for_class => $p{for_class},
45 attribute_metaclass_roles =>
46 ['MooseX::FollowPBP::Role::Attribute'],
51 This role applies a method modifier to the C<_process_options()>
52 method, and tweaks the reader and writer parameters so that they
53 follow the style recommended in I<Perl Best Practices>.