Skip to content

Commit 3ed1803

Browse files
authored
Add note on where-clause side-effects
https://rt.perl.org/Ticket/Display.html?id=130886
1 parent 8753464 commit 3ed1803

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

doc/Type/Signature.pod6

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ the C<where>-clause inside the sub-signature.
150150
};
151151
say one-of-them(c=>42); # OUTPUT: «42␤»
152152
153+
Note: where-clauses that produce side-effects (e.g. printing output,
154+
pulling from an iterator, or increasing a state variable) are not supported
155+
and may produce surprising results if used.
156+
153157
=head3 Constraining Optional Arguments
154158
155159
L<Optional arguments|#Optional_and_Mandatory_Parameters> can have constraints,

0 commit comments

Comments
 (0)