maybe::next::method#
Tail-call the next implementation of the currently executing method if one exists; otherwise return quietly.
Synopsis#
sub DESTROY {
my $self = shift;
... # cleanup
$self->maybe::next::method;
}
Equivalent to $self->next::method(@_) if $self->next::can in the common case. The usual reason to reach for it is a DESTROY or hook method where missing parent implementations are normal.
It does not work as the target of goto &maybe::next::method: after the goto the method that did it is no longer on the call stack, so the lookup starts from its caller instead - at top level that croaks with next::method/next::can/maybe::next::method must be used in method context.