next_can#
Return a code reference to the next implementation of the currently executing method, or undef if there is none.
Synopsis#
my $cv = $self->next::can; $cv->($self, @args) if $cv;
Looks at the method currently on the call stack, walks the C3
linearization of $self past its defining package, and returns
the first same-named method found further down the list as a CV
reference. Unlike next::method, finding no such method is not
fatal — it returns undef so you can decide how to handle the
absence.
Must be called inside a method body. Top-level or non-method
callers croak with
next::method/next::can/maybe::next::method must be used in method context.