From 1102a6f006f2bb626d2c7f1c5b7d360c28518129 Mon Sep 17 00:00:00 2001 From: chromatic Date: Thu, 27 Oct 2022 11:24:58 +0200 Subject: Enable `use feature 'module_true'` Per RFC 18, whenever `use feature 'module_true';` is enabled in a scope, any file required with `require` has an implicit return value of true and will not trigger the "did not return a true value" error condition. This includes logic to use the OPf_SPECIAL flag for OP_RETURN listops to indicate that the module_true feature is in effect when it executes. This flag plays no role unless the OP_RETURN tail calls the pp_leaveeval logic, so it doesn't affect normal sub returns. --- op.h | 1 + 1 file changed, 1 insertion(+) (limited to 'op.h') diff --git a/op.h b/op.h index ec3e1204a3..12f0c5ce2d 100644 --- a/op.h +++ b/op.h @@ -161,6 +161,7 @@ Deprecated. Use C instead. /* On OP_DUMP, has no label */ /* On OP_UNSTACK, in a C-style for loop */ /* On OP_READLINE, it's for <<>>, not <> */ + /* On OP_RETURN, module_true is in effect */ /* There is no room in op_flags for this one, so it has its own bit- field member (op_folded) instead. The flag is only used to tell op_convert_list to set op_folded. */ -- cgit v1.2.1