From: Nicholas Clark Date: Tue, 19 Feb 2002 19:27:42 +0000 (+0000) Subject: Re: Lexical scoping bug with EXPR for EXPR? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bc92d8c04127b7dfc16c456beb86f6b7d195458b;p=p5sagit%2Fp5-mst-13.2.git Re: Lexical scoping bug with EXPR for EXPR? Message-ID: <20020219192740.GF12268@Bagpuss.unfortu.net> (with modifications) p4raw-id: //depot/perl@14781 --- diff --git a/pod/perlsub.pod b/pod/perlsub.pod index b929c98..7933dc2 100644 --- a/pod/perlsub.pod +++ b/pod/perlsub.pod @@ -327,12 +327,12 @@ the scope of $answer extends from its declaration through the rest of that conditional, including any C and C clauses, but not beyond it. -B None of the foregoing text applies to C, -C or C modifiers appended to simple statements. Such -modifiers are not control structures and have no effect on scoping. The -use of such modifiers in conjunction with C is best avoided, as it may -have unexpected effects. A future release of Perl may define precise -semantics for constructs such as C. +B The behaviour of a C statement modified with a statement +modifier conditional or loop construct (e.g. C) is +B. The value of the C variable may be C, any +previously assigned value, or possibly anything else. Don't rely on +it. Future versions of perl might do something different from the +version of perl you try it out on. Here be dragons. The C loop defaults to scoping its index variable dynamically in the manner of C. However, if the index variable is