summaryrefslogtreecommitdiff
path: root/op.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-08-17 22:10:30 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-08-18 06:50:53 -0700
commit93f0bc4935f6ab558dbbd7c94b5d4a9bdd07eb9e (patch)
treec87045f693e17b5978ebe1b4a7f58d9ccf9623bb /op.h
parent7fa5bd9b5ba9d950fb8f72ee787a1d83167753b8 (diff)
downloadperl-93f0bc4935f6ab558dbbd7c94b5d4a9bdd07eb9e.tar.gz
&CORE::wantarray()
This commit allows &CORE::wantarray to be called via ampersand syntax or through references. It adds a new private flag for wantarray, OPpOFFBYONE, which caller will use as well, telling wantarray (or caller) to look one call fur- ther up the call stack.
Diffstat (limited to 'op.h')
-rw-r--r--op.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/op.h b/op.h
index f01e0bf07f..6a6e3f2d10 100644
--- a/op.h
+++ b/op.h
@@ -296,6 +296,9 @@ Deprecated. Use C<GIMME_V> instead.
/* Private for OP_ENTEREVAL */
#define OPpEVAL_HAS_HH 2 /* Does it have a copy of %^H */
+/* Private for OP_CALLER and OP_WANTARRAY */
+#define OPpOFFBYONE 128 /* Treat caller(1) as caller(2) */
+
struct op {
BASEOP
};