# - <@> lineseq KP ->9
# 1 <;> nextstate(main 635 optree_constants.t:163) v:>,<,% ->2
# 8 <@> prtf sK ->9
-# 2 <0> pushmark s ->3
-# 3 <$> const[PV "myint %d mystr %s myfl %f pi %f\n"] s ->4
-# 4 <$> const[IV 42] s* ->5
-# 5 <$> const[PV "hithere"] s* ->6
-# 6 <$> const[NV 1.414213] s* ->7
-# 7 <$> const[NV 3.14159] s* ->8
+# 2 <0> pushmark sM ->3
+# 3 <$> const[PV "myint %d mystr %s myfl %f pi %f\n"] sM ->4
+# 4 <$> const[IV 42] sM* ->5
+# 5 <$> const[PV "hithere"] sM* ->6
+# 6 <$> const[NV 1.414213] sM* ->7
+# 7 <$> const[NV 3.14159] sM* ->8
EOT_EOT
# 9 <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->9
# 1 <;> nextstate(main 635 optree_constants.t:163) v:>,<,% ->2
# 8 <@> prtf sK ->9
-# 2 <0> pushmark s ->3
-# 3 <$> const(PV "myint %d mystr %s myfl %f pi %f\n") s ->4
-# 4 <$> const(IV 42) s* ->5
-# 5 <$> const(PV "hithere") s* ->6
-# 6 <$> const(NV 1.414213) s* ->7
-# 7 <$> const(NV 3.14159) s* ->8
+# 2 <0> pushmark sM ->3
+# 3 <$> const(PV "myint %d mystr %s myfl %f pi %f\n") sM ->4
+# 4 <$> const(IV 42) sM* ->5
+# 5 <$> const(PV "hithere") sM* ->6
+# 6 <$> const(NV 1.414213) sM* ->7
+# 7 <$> const(NV 3.14159) sM* ->8
EONT_EONT
+if($] < 5.015) {
+ s/M(?=\*? ->)//g for $expect, $expect_nt;
+}
if($] < 5.009) {
# 5.8.x's use constant has larger types
foreach ($expect, $expect_nt) {
assert( (o->op_flags & OPf_WANT) != OPf_WANT_VOID );
+ if (type == OP_PRTF || type == OP_SPRINTF) type = OP_ENTERSUB;
+
switch (o->op_type) {
case OP_UNDEF:
localize = 0;
if (!kid)
op_append_elem(o->op_type, o, newDEFSVOP());
+ if (o->op_type == OP_PRTF) return modkids(listkids(o), OP_PRTF);
return listkids(o);
}
Perl_ck_fun, /* vec */
Perl_ck_index, /* index */
Perl_ck_index, /* rindex */
- Perl_ck_fun, /* sprintf */
+ Perl_ck_lfun, /* sprintf */
Perl_ck_fun, /* formline */
Perl_ck_fun, /* ord */
Perl_ck_fun, /* chr */
index index ck_index isT@ S S S?
rindex rindex ck_index isT@ S S S?
-sprintf sprintf ck_fun fmst@ S L
+sprintf sprintf ck_lfun fmst@ S L
formline formline ck_fun ms@ S L
ord ord ck_fun ifsTu% S?
chr chr ck_fun fsTu% S?
>%l< >''< >%l INVALID<
>%m< >''< >%m INVALID<
>%s< >sprintf('%%n%n %d', $n, $n)< >%n 2< >Slight sneakiness to test %n<
+>%s< >$n="abc"; sprintf(' %n%s', substr($n,1,1), $n)< > a1c< >%n w/magic<
>%o< >2**32-1< >37777777777<
>%+o< >2**32-1< >37777777777<
>%#o< >2**32-1< >037777777777<