in reply to Inconsistent warnings over undefined values
The exemption, where it applies, it checks for undef before trying to get the numeric value, but in the presence of magic, the flags used to check for undef are unreliable before the magic get, and the magic get is coupled to getting the numeric value which is coupled to producing the undef warning. In 5.8.9 and above, versions of the routines to get integer values are available that don't process magic (Sv[UI]V_nomg), but not the routine to get a floating point value (SvNV) or the routine to get an integer value only to see if the number is in range (SvIV_please). If those were available, the procedure could be changed to: get magic, check if undef, if so, assume 0 without warning, otherwise get the numeric value without magic.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Inconsistent warnings over undefined values
by oxone (Friar) on Jan 19, 2009 at 13:55 UTC |