summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorchromatic <chromatic@wgz.org>2022-10-27 11:24:58 +0200
committerYves Orton <demerphq@gmail.com>2022-11-01 09:46:16 +0100
commit1102a6f006f2bb626d2c7f1c5b7d360c28518129 (patch)
treeeb90ea178d14524d853018b788c2c0bc02021d22 /op.h
parent73d66f354cd4df0324b11e46af48f66bd5c1dd15 (diff)
downloadperl-1102a6f006f2bb626d2c7f1c5b7d360c28518129.tar.gz
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.
Diffstat (limited to 'op.h')
-rw-r--r--op.h1
1 files changed, 1 insertions, 0 deletions
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<GIMME_V> 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. */