Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
doc reserved method names
  • Loading branch information
gfldex committed Jun 29, 2016
1 parent 5a75e16 commit da20477
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/Language/typesystem.pod
Expand Up @@ -18,6 +18,18 @@ TODO
=head3 Methods
=head4 Reserved Method Names
Some build in introspection methods are actually special syntax provided by the
compiler, namely C<WHAT> and C<VAR>. Declaring methods with those names will
silently fail.
class A {
method WHAT { "ain't gonna happen" }
};
say A.new.WHAT; # OUTPUT«(A)␤»
=head4 Setting Attributes with Namesake Variables and Methods
Instead of writing C<< attr => $attr >> or C<:attr($attr)>, you can save some
Expand Down

0 comments on commit da20477

Please sign in to comment.