In Perl 6, classes, roles and grammars can have private methods, that is, methods that are only callable from within the class, and are not inherited by types derived by inheritance.
For the purposes of dispatching and scoping, private methods are closer to subroutines than to methods. However they share access to
self and attributes with methods.
method add_private_method(Metamodel::PrivateMethodContainer: , , )
Adds a private method
$code with name
method private_method_table(Metamodel::PrivateMethodContainer: )
Returns a hash of
name => &method_object