我不能在Perl 6中的类中调用私有方法:
class MyClass { method !my-private-method($var1) { # .... } method my-method() { my $my-var1 = !my-private-method(123); # not found (Undeclared routines) my $my-var1 = $!my-private-method(123); # not found (Undeclared routines) my $my-var1 = $.my-private-method(123); # not found (Undeclared routines) my $my-var1 = my-private-method(123); # not found (Undeclared routines)
那么如何从my-method调用my-private-method呢?