if ((o->op_flags & OPf_KIDS)) {
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? */
Perl_ck_warner_d(aTHX_ packWARN(WARN_DEPRECATED),
=item *
-XXX L<message|perldiag/"message">
+L<defined(@array) is deprecated|perldiag/"defined(@array) is deprecated">
+
+The long-deprecated C<defined(@array)> now also warns for package variables.
+Previously it only issued a warning for lexical variables.
=back
my $x = "foo";
defined @$x;
EXPECT
+defined(@array) is deprecated at - line 4.
+ (Maybe you should just omit the defined()?)
Can't use string ("foo") as an ARRAY ref while "strict refs" in use at - line 4.
########
# [perl #37886] strict 'refs' doesn't apply inside defined
EXPECT
########
# op.c
-# TODO - defined @::array doesn't warn yet.
defined(@a);
EXPECT
defined(@array) is deprecated at - line 2.