And similarly for newSVpvn() for a known length.
if (flags & ~(SVf_UTF8))
Perl_croak(aTHX_ "panic: store_cop_label illegal flag bits 0x%" UVxf,
(UV)flags);
- labelsv = sv_2mortal(newSVpvn(label, len));
+ labelsv = newSVpvn_flags(label, len, SVs_TEMP);
if (flags & SVf_UTF8)
SvUTF8_on(labelsv);
cop->cop_hints_hash
}
if (name_count == 1) {
if (HEK_LEN(*namep) == 4 && strnEQ(HEK_KEY(*namep), "main", 4)) {
- namesv = sv_2mortal(newSVpvs(""));
+ namesv = newSVpvs_flags("", SVs_TEMP);
}
else {
namesv = sv_2mortal(newSVhek(*namep));
PUSHs(sv_2mortal(newSVuv(an_unsigned_integer)))
PUSHs(sv_2mortal(newSVnv(a_double)))
PUSHs(sv_2mortal(newSVpv("Some String",0)))
+ /* Although the last example is better written as the more efficient: */
+ PUSHs(newSVpvs_flags("Some String", SVs_TEMP))
And now the Perl program calling C<tzname>, the two values will be assigned
as in: