We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f140dd4 commit b5ccb5cCopy full SHA for b5ccb5c
doc/Language/operators.pod6
@@ -1238,9 +1238,9 @@ a single method named the same as C<$obj.^name> and that returns C<$obj>:
1238
1239
say 42 but 'forty two'; # 'forty two'
1240
1241
- my $s = 12 but class { method ^name ($) { 'warbles' } }.new;
1242
- say $s.warbles; # warbles.new
1243
- say $s + 42; # 54
+ my $s = 12 but class Warbles { method hi { 'hello' } }.new;
+ say $s.Warbles.hi; # hello
+ say $s + 42; # 54
1244
1245
If methods of the same name are present already, the last mixed in role takes
1246
precedence. A list of methods can be provided in parentheses separated by
0 commit comments