File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -687,6 +687,12 @@ exception L<X::TypeCheck::Return|/type/X::TypeCheck::Return> is thrown. If it
687
687
passes a control exception is raised and can be caught with
688
688
L < CONTROL|/language/phasers#CONTROL > .
689
689
690
+ Any C < return > in a block is tied to the outer lexical scope of that block.
691
+ Please note that a C < return > in the root of a package will fail at runtime. A
692
+ C < return > in a block that is evaluated lazily (e.g. inside C < map > ) may find the
693
+ outer lexical routine gone by the time the block is executed. In almost any
694
+ case C < last > is the better alternative.
695
+
690
696
= comment TODO add link to section in /language/function that shows how return values are produces/handled
691
697
692
698
= head1 X < return-rw|control flow >
You can’t perform that action at this time.
0 commit comments