Document code point which makes if (defined %stash::) to work
Jarkko Hietaniemi [Fri, 18 Aug 2000 16:21:49 +0000 (16:21 +0000)]
(noted by Spider Boardman).

p4raw-id: //depot/perl@6699

op.c

diff --git a/op.c b/op.c
index 86bd419..263f784 100644 (file)
--- a/op.c
+++ b/op.c
@@ -5763,6 +5763,10 @@ Perl_ck_defined(pTHX_ OP *o)             /* 19990527 MJD */
     if ((o->op_flags & OPf_KIDS) && ckWARN(WARN_DEPRECATED)) {
        switch (cUNOPo->op_first->op_type) {
        case OP_RV2AV:
+           /* This is needed for
+              if (defined %stash::)
+              to work.   Do not break Tk.
+              */
            break;                      /* Globals via GV can be undef */ 
        case OP_PADAV:
        case OP_AASSIGN:                /* Is this a good idea? */
@@ -5772,6 +5776,10 @@ Perl_ck_defined(pTHX_ OP *o)             /* 19990527 MJD */
                        "\t(Maybe you should just omit the defined()?)\n");
        break;
        case OP_RV2HV:
+           /* This is needed for
+              if (defined %stash::)
+              to work.   Do not break Tk.
+              */
            break;                      /* Globals via GV can be undef */ 
        case OP_PADHV:
            Perl_warner(aTHX_ WARN_DEPRECATED,