summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-06-02 01:37:33 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-06-02 01:37:33 +0000
commit69dec784b2576ea54ab7c7c5e03371f1f8861260 (patch)
treef9c5605e00df11c9c976f39346dfc612c191dab6 /op.c
parentba106d47906768b6e657462b9a484fe0c3a0f0d5 (diff)
parentf54b75aca7a5c24d01f65ce2849ffe277974f0e9 (diff)
downloadperl-69dec784b2576ea54ab7c7c5e03371f1f8861260.tar.gz
integrate cfgperl contents into mainline
p4raw-id: //depot/perl@3516
Diffstat (limited to 'op.c')
-rw-r--r--op.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/op.c b/op.c
index 88cc607daf..2bfd9041be 100644
--- a/op.c
+++ b/op.c
@@ -5008,6 +5008,30 @@ ck_lfun(OP *o)
}
OP *
+ck_defined(OP *o) /* 19990527 MJD */
+{
+ if (ckWARN(WARN_DEPRECATED)) {
+ switch (cUNOPo->op_first->op_type) {
+ case OP_RV2AV:
+ case OP_PADAV:
+ case OP_AASSIGN: /* Is this a good idea? */
+ warner(WARN_DEPRECATED, "defined(@array) is deprecated (and not really meaningful)");
+ warner(WARN_DEPRECATED, "(Maybe you should just omit the defined()?)\n");
+ break;
+ case OP_RV2HV:
+ case OP_PADHV:
+ warner(WARN_DEPRECATED, "defined(%hash) is deprecated (and not really meaningful)");
+ warner(WARN_DEPRECATED, "(Maybe you should just omit the defined()?)\n");
+ break;
+ default:
+ /* no warning */
+ break;
+ }
+ }
+ return ck_rfun(o);
+}
+
+OP *
ck_rfun(OP *o)
{
OPCODE type = o->op_type;