File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -153,7 +153,7 @@ default accessor for the attribute will return a writable value.
153153
154154=head2 X<trait is readonly|Traits,is readonly>
155155
156- =for code :skip-test<listing>
156+ =for code
157157 multi trait_mod:<is> (Attribute:D $attr, :readonly($)!)
158158
159159Marks as C<readonly> an attribute of a class that has the C<is rw> trait.
@@ -165,8 +165,8 @@ Marks as C<readonly> an attribute of a class that has the C<is rw> trait.
165165 };
166166
167167 my $t = Thing.new(matter => "copper", form => "cubic");
168- my $t.form = "round"; # OK, form is rw
169- my $t.matter = "iron"; # not OK, matter is readonly
168+ $t.form = "round"; # OK, form is rw
169+ $t.matter = "iron"; # not OK, matter is readonly
170170 # OUTPUT: «Cannot modify an immutable Str (copper)...»
171171 =end code
172172
You can’t perform that action at this time.
0 commit comments