diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-06-02 01:37:33 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-06-02 01:37:33 +0000 |
commit | 69dec784b2576ea54ab7c7c5e03371f1f8861260 (patch) | |
tree | f9c5605e00df11c9c976f39346dfc612c191dab6 /op.c | |
parent | ba106d47906768b6e657462b9a484fe0c3a0f0d5 (diff) | |
parent | f54b75aca7a5c24d01f65ce2849ffe277974f0e9 (diff) | |
download | perl-69dec784b2576ea54ab7c7c5e03371f1f8861260.tar.gz |
integrate cfgperl contents into mainline
p4raw-id: //depot/perl@3516
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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; |