In my Inline::C based CAD::Drawing::IO::DWGI.pm, I've been using the following
check under perl 5.6.1 without any problems:
if(! SvNOK(val))
croak("not a double");
dwg->aden->arc.radius = SvNV(val);
Then, after upgrading to 5.8.3, that caused problems with the number 1, so I
changed it to this:
if(! (SvNOK(val) || SvIOK(val)))
croak("not a number");
dwg->aden->arc.radius = SvNV(val);
Now, that fails if the number came from a string. So, what now? If I just
get rid of the check altogether, the magic works as expected. Is this "the
right way" (TM)
Seems kind of silly that the best way is not to check, but I guess if the
perlguts are as magical as the front-end, that's fine with me.
--Eric