/* No point in studying a zero length string, and not safe to study
anything that doesn't appear to be a simple scalar (and hence might
change between now and when the regexp engine runs without our set
magic ever running) such as a reference to an object with overloaded
/* No point in studying a zero length string, and not safe to study
anything that doesn't appear to be a simple scalar (and hence might
change between now and when the regexp engine runs without our set
magic ever running) such as a reference to an object with overloaded
+ stringification. Also refuse to study an FBM scalar, as this gives
+ more flexibility in SV flag usage. No real-world code would ever
+ end up studying an FBM scalar, so this isn't a real pessimisation.
+ */
if (!SvROK(ary) || SvTYPE(SvRV(ary)) != SVt_PVAV)
Perl_die(aTHX_ "Not an ARRAY reference");
else if (SvOBJECT(SvRV(ary)))
if (!SvROK(ary) || SvTYPE(SvRV(ary)) != SVt_PVAV)
Perl_die(aTHX_ "Not an ARRAY reference");
else if (SvOBJECT(SvRV(ary)))