This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
further simplify (??{}) return code
This does two things. First, it conflates the RV and non-RV cases; i.e.
if (ROK) {
sv = RV(sv)
if (REGEXP) rx = sv;
else if (PERL_MAGIC_qr) rx = mg_obj;
}
else {
if (REGEXP) rx = sv;
else if (PERL_MAGIC_qr) rx = mg_obj;
}
becomes
if (ROK)
sv = RV(sv)
if (REGEXP) rx = sv;
else if (PERL_MAGIC_qr) rx = mg_obj;
Secondly, elmininate the intermediate rx var; it's only point in life is
to be assigned to re_sv, so just use re_sv throughout.