Skip to content

Commit b5ccb5c

Browse files
authored
Change example with method ^name in it
'cause it's not specced ATM https://irclog.perlgeek.de/perl6/2016-12-20#i_13774824
1 parent f140dd4 commit b5ccb5c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc/Language/operators.pod6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,9 +1238,9 @@ a single method named the same as C<$obj.^name> and that returns C<$obj>:
12381238
12391239
say 42 but 'forty two'; # 'forty two'
12401240
1241-
my $s = 12 but class { method ^name ($) { 'warbles' } }.new;
1242-
say $s.warbles; # warbles.new
1243-
say $s + 42; # 54
1241+
my $s = 12 but class Warbles { method hi { 'hello' } }.new;
1242+
say $s.Warbles.hi; # hello
1243+
say $s + 42; # 54
12441244
12451245
If methods of the same name are present already, the last mixed in role takes
12461246
precedence. A list of methods can be provided in parentheses separated by

0 commit comments

Comments
 (0)