Skip to content

Commit

Permalink
$. method call syntax shorthand works with meta-methods refs #2632
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ committed Jun 20, 2020
1 parent 587622d commit a493998
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions doc/Language/operators.pod6
Expand Up @@ -805,6 +805,17 @@ metaclass. It desugars to C<$invocant.HOW.method($invocant, ...)>. See
L<the metaobject protocol documentation|/language/mop> for more information.
Technically, not a real operator; it's syntax special-cased in the compiler.
It can be also applied, within classes, to access metamethods on self:
=for code
class Foo {
has $.a = 3;
method bar {
return $.^name
}
};
say Foo.new.bar; # OUTPUT: «Foo␤»
X«|methodop .?»
=head2 methodop C«.?»
Expand Down

0 comments on commit a493998

Please sign in to comment.