Skip to content

Commit

Permalink
Note the change in anon builder methods in roles in 0.030
Browse files Browse the repository at this point in the history
Just a little clue.
  • Loading branch information
rsrchboy committed May 9, 2017
1 parent cf017aa commit 9fc51ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/MooseX/AttributeShortcuts.pm
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ Passing a coderef to builder will cause that coderef to be installed in the
class this attribute is associated with the name you'd expect, and
C<builder =E<gt> 1> to be set.
e.g., in your class,
e.g., in your class (or role),
has foo => (is => 'ro', builder => sub { 'bar!' });
Expand All @@ -257,6 +257,11 @@ e.g., in your class,
has foo => (is => 'ro', builder => '_build_foo');
sub _build_foo { 'bar!' }
The behaviour of this option in roles changed in 0.030, and the builder
methods will be installed in the role itself. This means you can
alias/exclude/etc builder methods in roles, just as you can with any other
method.
=head2 clearer => 1
Specifying C<clearer =E<gt> 1> will cause the following options to be set:
Expand Down

0 comments on commit 9fc51ab

Please sign in to comment.