File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ again), you can change the attribute declaration:
166166=for code
167167has Bool $.done is rw;
168168
169- The C<is rw> trait causes the generated accessor method to return a container
169+ The L< C<is rw>|/type/Attribute#trait_is_rw > trait causes the generated accessor method to return a container
170170so external code can modify the value of the attribute.
171171
172172=head2 C<is built> trait
@@ -177,10 +177,11 @@ has &!callback is built;
177177X<|Types,traits;Types,is built>
178178By default private attributes are not automatically set by the default constructor. (They are private after
179179all.) In the above example we want to allow the user to provide the initial value but keep the attribute
180- otherwise private. The C<is built> trait allows to do just that.
180+ otherwise private. The L< C<is built>|/type/Attribute#trait_is_built > trait allows to do just that.
181181
182- One can also use it to do the opposite for public attributes, i.e. prevent them to be automatically
183- initialized with a user provided value, but still generate the accessor method:
182+ One can use the same trait C<is built> to do the opposite for public attributes, i.e. prevent them from being
183+ automatically initialized with a user-provided value, but still generate the accessor method. This is done by giving
184+ the argument C<False> to the trait:
184185
185186=for code
186187has $.done is built(False);
You can’t perform that action at this time.
0 commit comments