sv.c: !SvLEN does not mean undefined
There are various SvPOKp(sv) && SvLEN(sv) checks in numeric
conversion routines in sv.c, which date back to perl 1. (See
<http://perl5.git.perl.org/perl.git/blob/
8d063cd8450e59e:/str.c#l89>.)
Back then it did not matter, as str->len (later SvLEN) was always set
when there was a PV. It was not until perl 5.003_01 (
1edc1566d5) that
we got the SvLEN==0 mechanism for PVs not owned by the scalar. (I
don’t believe it was actually used till later, so when this became a
problem I don’t know--but that’s enough digging.)
A regexp returned by ${qr//} is POK but does not own its string. This
means that nummifying a regexp will result in a uninitialized warning.
The SvLEN check is redundant and problematic, so I am removing it.
(This also means I can remove the sv_force_normal calls in the next
commit, since shared hash key scalars, which also have SvLEN==0 will
no longer need it to pass the SvLEN checks.)
This does mean, however, that SVt_REGEXP can reach code paths that
expect to be able to use Sv[IN]VX (not valid for regexps), so I actu-
ally have to check that the type != SVt_REGEXP as well. We already
have code for handling fbm scalars (for which Sv[IN]VX fields are also
unusable), so we can send regexps through those paths.