summaryrefslogtreecommitdiff
path: root/pad.c
diff options
context:
space:
mode:
Diffstat (limited to 'pad.c')
-rw-r--r--pad.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/pad.c b/pad.c
index c7a18c2211..207f475afd 100644
--- a/pad.c
+++ b/pad.c
@@ -1304,9 +1304,7 @@ Perl_pad_tidy(pTHX_ padtidy_type type)
AvREIFY_only(av);
}
- /* XXX DAPM rationalise these two similar branches */
-
- if (type == padtidy_SUB) {
+ if (type == padtidy_SUB || type == padtidy_FORMAT) {
PADOFFSET ix;
for (ix = AvFILLp(PL_comppad); ix > 0; ix--) {
if (SvIMMORTAL(PL_curpad[ix]) || IS_PADGV(PL_curpad[ix]) || IS_PADCONST(PL_curpad[ix]))
@@ -1315,13 +1313,6 @@ Perl_pad_tidy(pTHX_ padtidy_type type)
SvPADTMP_on(PL_curpad[ix]);
}
}
- else if (type == padtidy_FORMAT) {
- PADOFFSET ix;
- for (ix = AvFILLp(PL_comppad); ix > 0; ix--) {
- if (!SvPADMY(PL_curpad[ix]) && !SvIMMORTAL(PL_curpad[ix]))
- SvPADTMP_on(PL_curpad[ix]);
- }
- }
PL_curpad = AvARRAY(PL_comppad);
}