Skip to content

Commit

Permalink
consistent indentation; minor grammar improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
perlpilot committed May 14, 2014
1 parent 51a92da commit f5bcc41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/Perl6/Perl5/Differences.pod
Expand Up @@ -395,14 +395,14 @@ You can still say C<sort(@array)> if you prefer the non-OO idiom.
Since both builtin functions and operators are multi subs and methods,
changing their behaviour for particular types is a simple as adding the
appropriate multi subs and methods. If you want these to be globally
available, well, you can't, because everything lexically scoped in Perl 6.
available, well, you can't, because everything is lexically scoped in Perl 6.
You can, however, export multi definitions to any code that wishes to import it.

class TurkishStr {
multi sub uc(TurkishStr $str) is export { ... }
multi sub uc(TurkishStr $str) is export { ... }

# overload the string concatenation:
multi sub infix:<~>(TurkishStr $us, TurkishStr $them) is export { ... }
# overload the string concatenation:
multi sub infix:<~>(TurkishStr $us, TurkishStr $them) is export { ... }
}

If you want to offer a type cast to a particular type, just provide a method
Expand Down

0 comments on commit f5bcc41

Please sign in to comment.