Bryan C. Warnock sniped:

   > >    > Okay, this part has me confused.
   > >
   > > And rightly so: it was a screw-up. I lost track of whether I was keeping
   > > the property on the value or on the node reference and ended up doing
   > > both.
   > 
   > What?  You didn't test it before you posted it?  For shame!   ;-)

Of course, I tested it! As I explained:

        Interestingly, the code still *worked* since the (originally
        unset) property on the node reference would have returned
        C<undef> which would undergo the usual boolean conversion in the
        C<if>, and the usual promotion to zero in the numerical context
        of the increment.

The point is that (as in Perl 5) neither of these two cases of undef
promotion trigger a warning, so there was nothing to alert me to the
fact that the initialization of the value was redundant!

;-)

Damian

Reply via email to