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