Applying copy-on-write to pad names when generating uninitial-
ised warnings results in modifications to SvPVX(sv) after
sv_setsv(sv,padname) affecting the pad name as well. sv_setsv_flags
with no flags avoids the COW.
Under PERL_OLD_COPY_ON_WRITE and warnings, this:
my (@ma);
$v = sin $ma[1000];
$v = sin $ma[$$];
was producing this:
$ pbpaste|./miniperl -w
Use of uninitialized value $ma[1000] in sin at - line 2.
Use of uninitialized value within $ma in sin at - line 3.
If you comment out the sceond line:
$ pbpaste|./miniperl -w
Name "main::v" used only once: possible typo at - line 3.
Use of uninitialized value within @ma in sin at - line 3.
Notice the @ma/$ma difference.
The first uninit warning was modifying the pad name.
return NULL;
av = *PadlistARRAY(CvPADLIST(cv));
sv = *av_fetch(av, targ, FALSE);
- sv_setsv(name, sv);
+ sv_setsv_flags(name, sv, 0);
}
if (subscript_type == FUV_SUBSCRIPT_HASH) {