Currently pp_match and pp_subst make a copy of the match string if it's
SvTEMP(), and in the case of pp_match, also if it's SvAMAGIC().
This is no longer necessary, as the code will always copy the string
anyway if its actually needed after the match, i.e. if it detects the
presence of $1, $& or //p etc. Until a few commits ago, this wasn't the
case for pp_match: it would sometimes skip copying even in the presence of
$1 et al for efficiency reasons. Now that that's fixed, we can remove the
SvTEMP() and SvAMAGIC() tests.
As to why pp_subst did the SvTEMP test, I don't know: but removing it
didn't make any tests fail!
}
if ( RX_NPARENS(rx)
|| PL_sawampersand
- || SvTEMP(TARG)
- || SvAMAGIC(TARG)
|| (RX_EXTFLAGS(rx) & (RXf_EVAL_SEEN|RXf_PMf_KEEPCOPY))
) {
r_flags |= (REXEC_COPY_STR|REXEC_COPY_SKIP_PRE);
r_flags = ( RX_NPARENS(rx)
|| PL_sawampersand
- || SvTEMP(TARG)
|| (RX_EXTFLAGS(rx) & (RXf_EVAL_SEEN|RXf_PMf_KEEPCOPY))
)
? REXEC_COPY_STR