In article <[EMAIL PROTECTED]>, Chris Dolan <[EMAIL PROTECTED]> wrote:
>can someone explain why <op>=
>does not warn?  Is it because (quoting perlop)
>
>     $a += 2; is equivalent to $a = $a + 2; although without
>     duplicating any side effects that dereferencing the lvalue
>     might trigger
>
>and the warn is considered a side effect?  Or is it just a kluge to
>support someone developer's personal preferences?

The latter.  The following operators intentionally suppress the warning if
the left (or only) operand is undef:
++ and -- (both pre- and post- variants), |= and ^= (both string and numeric),
&&=, ||=, +=, -=, and .=.

This is considered a Good Thing(TM).  I thought this was documented
somewhere (other than t/op/assignwarn.t :) but can't find it now.

>Is it possible to enable warnings for this case in 5.8?

Too late, I'm afraid.

Reply via email to