Prior to this commit, the debugging output says "Compiling REx foo".
But there was no indication that it was skipped due to the pattern
already being compiled; so that was confusing to people, and was a Stack
Overflow question of what is going on. Now there's an extra message
that the recompilation is skipped.
&& memEQ(RX_PRECOMP(old_re), exp, plen)
&& !runtime_code /* with runtime code, always recompile */ )
{
+ DEBUG_COMPILE_r({
+ SV *dsv= sv_newmortal();
+ RE_PV_QUOTED_DECL(s, RExC_utf8, dsv, exp, plen, PL_dump_re_max_len);
+ Perl_re_printf( aTHX_ "%sSkipping recompilation of unchanged REx%s %s\n",
+ PL_colors[4], PL_colors[5], s);
+ });
return old_re;
}