@@ -13901,19 +13901,6 @@ Perl_ck_open(pTHX_ OP *o)
1390113901 last->op_private &= ~OPpCONST_STRICT;
1390213902 }
1390313903 }
13904- {
13905- /* mark as special if filename is a literal undef */
13906- const OP *arg = cLISTOPx(o)->op_first; /* pushmark */
13907- if (
13908- (arg = OpSIBLING(arg)) /* handle */
13909- && (arg = OpSIBLING(arg)) /* mode */
13910- && (arg = OpSIBLING(arg)) /* filename */
13911- ) {
13912- if (arg->op_type == OP_UNDEF && !(arg->op_flags & OPf_KIDS)) {
13913- o->op_flags |= OPf_SPECIAL;
13914- }
13915- }
13916- }
1391713904 return ck_fun(o);
1391813905}
1391913906
@@ -16113,19 +16100,7 @@ Perl_coresub_op(pTHX_ SV * const coreargssv, const int code,
1611316100 }
1611416101 return o;
1611516102 default:
16116- /* For open(), OPf_SPECIAL indicates we saw a literal undef as the
16117- * filename argument and thus a &PL_sv_undef argument at runtime
16118- * should trigger the creation of a temp file. This is to
16119- * distinguish between open(..., ..., undef) and
16120- * open(..., ..., delete $hash{key}), which also passes
16121- * &PL_sv_undef if $hash{key} does not exist, but which should not
16122- * create a temporary file.
16123- * In case of a runtime call via &CORE::open(...) or
16124- * my $f = \&CORE::open; $f->(...), we cannot distinguish between
16125- * those cases. Therefore we always set the flag to interpret
16126- * &PL_sv_undef as a temp file.
16127- */
16128- o = op_convert_list(opnum,OPf_SPECIAL*(opnum == OP_GLOB || opnum == OP_OPEN),argop);
16103+ o = op_convert_list(opnum,OPf_SPECIAL*(opnum == OP_GLOB),argop);
1612916104 if (is_handle_constructor(o, 2))
1613016105 argop->op_private |= OPpCOREARGS_DEREF2;
1613116106 if (opnum == OP_SUBSTR) {
0 commit comments