Call an object method: Difference between revisions

Content added Content deleted
Line 962: Line 962:
@a-good-mix>>.&free-floating-method; # and let Perl 6 pick the right candidate for us
@a-good-mix>>.&free-floating-method; # and let Perl 6 pick the right candidate for us


C.some-method(); # actually we don't really need an instance of C. We can call class method aswell.</lang>
C.some-method(); # actually we don't really need an instance of C. We can call class methods aswell.</lang>
Note that, unlike in Perl 5, class names are type objects, not strings. (Type objects are typed variants of the undefined value in Perl 6.)
Note that, unlike in Perl 5, class names are type objects, not strings. (Type objects are typed variants of the undefined value in Perl 6.)