This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
{PATCH] Re: Lexical scoping bug with EXPR for EXPR?
authorDave Mitchell <davem@fdisolutions.com>
Tue, 19 Feb 2002 10:30:30 +0000 (10:30 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 19 Feb 2002 13:34:16 +0000 (13:34 +0000)
Message-Id: <200202191030.KAA24180@gizmo.fdgroup.co.uk>

p4raw-id: //depot/perl@14769

pod/perlsub.pod

index 8ec39e3..168f305 100644 (file)
@@ -327,9 +327,12 @@ the scope of $answer extends from its declaration through the rest
 of that conditional, including any C<elsif> and C<else> clauses, 
 but not beyond it.
 
-None of the foregoing text applies to C<if/unless> or C<while/until>
-modifiers appended to simple statements.  Such modifiers are not
-control structures and have no effect on scoping.
+B<NOTE:> None of the foregoing text applies to C<if/unless>,
+C<while/until> or C<for> modifiers appended to simple statements.  Such
+modifiers are not control structures and have no effect on scoping.  Use
+of such modifiers in conjunction with C<my> may have unexpected effects,
+and are best avoided.  A future release of Perl may define precise
+semantics for constructs such as C<my $foo = 1 if $bar>.
 
 The C<foreach> loop defaults to scoping its index variable dynamically
 in the manner of C<local>.  However, if the index variable is