Skip to content

Commit eed0fd1

Browse files
committed
doc return statement
1 parent f1f94c7 commit eed0fd1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

doc/Language/control.pod6

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,9 @@ All these forms may produce a return value the same way C<loop> does.
694694
695695
=head1 X<return|control flow>
696696
697-
=comment TODO
697+
The routine C<return> will stop execution of a subroutine or method, run all relevant L<phasers|/language/phasers#Block_Phasers> and provide the given return value to the caller. The default return value is C<Nil>. If a return L<type constraint|/type/Signature#Constraining_Return_Types> is provided it will be checked unless the return value is C<Nil>. A control exception is raised and can be caught with L<CONTROL|/language/phasers#CONTROL>.
698+
699+
=comment TODO add link to section in /language/function that shows how return values are produces/handled
698700
699701
=head1 X<return-rw|control flow>
700702

0 commit comments

Comments
 (0)