Skip to content

Commit

Permalink
we are talking about sub return, method return is handled in /type/Mu
Browse files Browse the repository at this point in the history
  • Loading branch information
gfldex committed Dec 18, 2016
1 parent f622680 commit 0afdeea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/Language/control.pod6
Expand Up @@ -678,7 +678,7 @@ All these forms may produce a return value the same way C<loop> does.
=head1 X<return|control flow>
The routine C<return> will stop execution of a subroutine or method, run all
The sub 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
Expand All @@ -691,7 +691,7 @@ L<CONTROL|/language/phasers#CONTROL>.
=head1 X<return-rw|control flow>
The routine C<return> will return values, not containers. Those are immutable
The sub C<return> will return values, not containers. Those are immutable
and will lead to runtime errors when attempted to be mutated.
sub s(){ my $a = 41; return $a };
Expand Down

0 comments on commit 0afdeea

Please sign in to comment.