Change 14781 by jhi@alpha on 2002/02/20 13:58:16

        Subject: Re: Lexical scoping bug with EXPR for EXPR?
        From: Nicholas Clark <[EMAIL PROTECTED]> 
        Date: Tue, 19 Feb 2002 19:27:42 +0000
        Message-ID: <[EMAIL PROTECTED]>
        
        (with modifications)

Affected files ...

.... //depot/perl/pod/perlsub.pod#44 edit

Differences ...

==== //depot/perl/pod/perlsub.pod#44 (text) ====
Index: perl/pod/perlsub.pod
--- perl/pod/perlsub.pod.~1~    Wed Feb 20 07:15:05 2002
+++ perl/pod/perlsub.pod        Wed Feb 20 07:15:05 2002
@@ -327,12 +327,12 @@
 of that conditional, including any C<elsif> and C<else> clauses, 
 but not beyond it.
 
-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. The
-use of such modifiers in conjunction with C<my> is best avoided, as it may
-have unexpected effects.  A future release of Perl may define precise
-semantics for constructs such as C<my $foo = 1 if $bar>.
+B<NOTE:> The behaviour of a C<my> statement modified with a statement
+modifier conditional or loop construct (e.g. C<my $x if ...>) is
+B<undefined>.  The value of the C<my> variable may be C<undef>, 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<foreach> loop defaults to scoping its index variable dynamically
 in the manner of C<local>.  However, if the index variable is
End of Patch.

Reply via email to