summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-11-09 06:30:03 -0800
committerRicardo Signes <rjbs@cpan.org>2014-01-14 09:33:01 -0500
commit0953b66bdb6b9cd4da676d1614e87fe081b20a9c (patch)
tree965f4ed80afcc8a81700f274392e1e8cf12a2a5f /op.c
parentef40a5dd8380ca9dcbf40ccf6f706a4b5e25bbc6 (diff)
downloadperl-0953b66bdb6b9cd4da676d1614e87fe081b20a9c.tar.gz
Make key/push $scalar experimental
We need a better name for the experimental category, but I have not thought of one, even after sleeping on it.
Diffstat (limited to 'op.c')
-rw-r--r--op.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/op.c b/op.c
index 6cf532f941..c8bfca43df 100644
--- a/op.c
+++ b/op.c
@@ -9105,7 +9105,14 @@ Perl_ck_fun(pTHX_ OP *o)
/* Defer checks to run-time if we have a scalar arg */
if (kid->op_type == OP_RV2AV || kid->op_type == OP_PADAV)
op_lvalue(kid, type);
- else scalar(kid);
+ else {
+ scalar(kid);
+ /* diag_listed_as: push on reference is experimental */
+ Perl_ck_warner_d(aTHX_
+ packWARN(WARN_EXPERIMENTAL__AGGREF),
+ "%s on reference is experimental",
+ PL_op_desc[type]);
+ }
break;
case OA_HVREF:
if (kid->op_type == OP_CONST &&
@@ -10944,7 +10951,13 @@ Perl_ck_each(pTHX_ OP *o)
}
}
/* if treating as a reference, defer additional checks to runtime */
- return o->op_type == ref_type ? o : ck_fun(o);
+ if (o->op_type == ref_type) {
+ /* diag_listed_as: keys on reference is experimental */
+ Perl_ck_warner_d(aTHX_ packWARN(WARN_EXPERIMENTAL__AGGREF),
+ "%s is experimental", PL_op_desc[ref_type]);
+ return o;
+ }
+ return ck_fun(o);
}
OP *