method return
1 | class Mu |
1.1 | (Mu) method return |
Documentation for method return
assembled from the following types:
class Mu
From Mu
(Mu) method return
method return()
The method return
will stop execution of a subroutine or method, run all relevant phasers and provide invocant as a return value to the caller. If a return type constraint is provided it will be checked unless the return value is Nil
. A control exception is raised and can be caught with CONTROL.
sub f ;say f(); # OUTPUT: «any(1, 2, 3)»