There is currently a convenient exception in sv_force_normal that
allows read-only scalars to be modified at compile time.
I want to get rid of it, since most code that relies on it is buggy.
So stop ck_index from relying on that when it calls fbm_compile by
stopping fbm_compile from triggering the error by forcing stringifica-
tion of variables that are already strings.
if (mg && mg->mg_len >= 0)
mg->mg_len++;
}
- s = (U8*)SvPV_force_mutable(sv, len);
+ if (!SvPOK(sv) || SvNIOKp(sv) || SvIsCOW(sv))
+ s = (U8*)SvPV_force_mutable(sv, len);
+ else s = (U8 *)SvPV_mutable(sv, len);
if (len == 0) /* TAIL might be on a zero-length string. */
return;
SvUPGRADE(sv, SVt_PVMG);