Skip to content

Commit

Permalink
Tidy/fix some POD, enhance the MX::SemiAffordanceAccessor docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rsrchboy committed Jul 25, 2017
1 parent c6eb9a7 commit 9278e88
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions lib/MooseX/AttributeShortcuts.pm
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ __END__
extends 'Some::OtherClass';
has '+bar' => (traits => [Shortcuts], builder => 1, ...);
# or...
package Some::Other::Class;
=head1 DESCRIPTION
Ever find yourself repeatedly specifying writers and builders, because there's
Expand Down Expand Up @@ -467,22 +464,27 @@ so that it can be worked around, fixed, or documented, as appropriate.
=head2 MooseX::SemiAffordanceAccessor
L<MooseX::SemiAffordanceAccessor> changes how the C<is => 'rw'> and
C<accessor => ...> attribute options work. If our trait detects that an
L<MooseX::SemiAffordanceAccessor> changes how the C<< is => 'rw' >> and
C<< accessor => ... >> attribute options work. If our trait detects that an
attribute has had the
L<MooseX::SemiAffordanceAccessor attribute trait|MooseX::SemiAffordanceAccessor::Role::Attribute>
applied, then we change our behaviour to conform to its expectations:
=begin :list
* is => 'rwp'
* C<< is => 'rwp' >>
This:
has foo => (is => 'rwp');
has _bar => (is => 'rwp');
This is now effectively equivalent to:
...is now effectively equivalent to:
is => 'ro',
writer => '_set_...',
has foo => (is => 'ro', writer => '_set_foo');
has _bar => (is => 'ro', writer => '_set_bar')
* C<writer_prefix> is ignored
* C<-writer_prefix> is ignored
...as MooseX::SemiAffordanceAccessor has its own specific ideas as to how
writers should look.
Expand Down

0 comments on commit 9278e88

Please sign in to comment.