next_method#

Tail-call the next implementation of the currently executing method, passing the original arguments.

Synopsis#

sub greet { my $self = shift; $self->next::method(@_); # call the parent implementation }

Resolves the next method via the C3 linearization of $self and jumps to it as if with goto &sub. Control does not return to the caller of next::method; the resolved method’s return value is the one the original caller sees.

Croaks with No next::method found when nothing further in the linearization implements the method. Use maybe::next::method or next::can if the absence of a further implementation is expected.