walk( \&testsub, CLASS, @avoid )walk { BLOCK } $derivedwalk { BLOCK } $derived, $derivedwalk { BLOCK } $derived, __PACKAGE__
Class::Multi - Multiple inheritance support functions.
can().
SUPER::.
walk( \&testsub, CLASS, @avoid )Executes the supplied code reference once for each superclass of the supplied derived class, in the same depth-first order that PERL uses internally.
If an @avoid list is supplied, the code reference will not be executed until all classes in that list have been seen.
walk { BLOCK } $derivedExecutes the { BLOCK } once each for $derived and its superclasses.
walk { BLOCK } $derived, $derivedExecutes the { BLOCK } only for $derived's superclasses.
walk { BLOCK } $derived, __PACKAGE__Executes the { BLOCK } only for classes that are inherited after the class in which the expression is found.
other( $this, METHOD )other checks if the object or class $this has a method called 'METHOD',
that occurs -AFTER- the calling class in the inheritance tree.
Usage and semantics are otherwise identical to UNIVERSAL::can
The calling class is inferred via caller().
otherpkg( $this, METHOD )Identical to other, except the package name is returned instead of
the desired method's code reference.
$this->OTHER::mymethod( @myargs );Syntactic sugar.
Equivalent to &{other( $this, 'mymethod' )( @myargs )};.
Like SUPER::, OTHER:: expects the requested method to exist.
If it does not, an exception is thrown.