Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove bogus example and associated text.
The example for the over-riding of the MOP methods couldn't possibly
work and the assertion that supplying the name in quotes differs in
dispatch from the unquoted one is incorrect.

Closes #847
  • Loading branch information
jonathanstowe committed Aug 22, 2016
1 parent 4f433bb commit cfa04d8
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions doc/Language/mop.pod6
Expand Up @@ -51,16 +51,7 @@ These are introspective macros that resemble method calls.
Metamethods are generally named with ALLCAPS, and it is considered good
style to avoid creating your own methods with ALLCAPS names. This will avoid
conflicts with any metamethods that may appear in future versions of the
language. Note that if you really must use a method which has an ALLCAPS
name, use quotes around the method name to safely call it indirectly:
#| THIS IS A CLASS FOR SHOUTING THINGS
class MY-CLASSES-ARE-ALL-CAPS {
method WHY { "I DON'T KNOW" }
}
my $c = MY-CLASSES-ARE-ALL-CAPS.new;
say $c.WHY # "THIS IS A CLASS FOR SHOUTING THINGS"
say $c."WHY"() # "I DON'T KNOW"
language.
=head2 X<WHAT|syntax,WHAT>
Expand Down

0 comments on commit cfa04d8

Please sign in to comment.