.?method calls a method if it is defined. If the object does not have a method with the given name, Nil is returned.
class C { Β Β Β method m() {'m'} }Β my $c = C.new(); say $c.?m(); # m say $c.?n(); # Nil
Science, Programming, Electronics, Languages
N. B. Perl 6 has been renamed to Raku. Click to read more.
.?method calls a method if it is defined. If the object does not have a method with the given name, Nil is returned.
class C { Β Β Β method m() {'m'} }Β my $c = C.new(); say $c.?m(); # m say $c.?n(); # Nil