Documentation for routine hides

Documentation for routine hides, assembled from the following types:

language documentation Typesystem

From Typesystem

(Typesystem) trait hides

The trait hides provides inheritance without being subject to re-dispatching.

class A {
    method m { say 'i am hidden' }
}
class B hides A {
    method m { nextsame }
    method n { self.A::m }
};
 
B.new.m;
B.new.n;
# OUTPUT: «i am hidden␤» 

The trait <is hidden> allows a class to hide itself from re-dispatching.

class A is hidden {
    method m { say 'i am hidden' }
}
class B is A {
    method m { nextsame }
    method n { self.A::m }
}
 
B.new.m;
B.new.n;
# OUTPUT: «i am hidden␤» 

role Metamodel::MultipleInheritance

From Metamodel::MultipleInheritance

(Metamodel::MultipleInheritance) method hides

method hides(Metamodel::MultipleInheritance:D: $obj)

Returns a list of all hidden parent classes.