Message-Id: <
20031005212754.5ef54472.rgarciasuarez@free.fr>
(Applied with tweaks to op.c and a comment.)
p4raw-id: //depot/perl@21406
return first;
}
}
- else if (ckWARN(WARN_MISC) && (first->op_flags & OPf_KIDS)) {
+ else if (ckWARN(WARN_MISC) && (first->op_flags & OPf_KIDS) &&
+ type != OP_DOR) /* [#24076] Don't warn for <FH> err FOO. */
+ {
OP *k1 = ((UNOP*)first)->op_first;
OP *k2 = k1->op_sibling;
OPCODE warnop = 0;
Value of readdir() operator can be "0"; test with defined() at - line 4.
########
# op.c
+use warnings 'misc';
+open FH, "<abc";
+$_ = <FH> err $_ = 1;
+($_ = <FH>) // ($_ = 1);
+opendir DH, ".";
+$_ = readdir DH err $_ = 1;
+$_ = <*> err $_ = 1;
+%a = (1,2,3,4) ;
+$_ = each %a err $_ = 1;
+EXPECT
+########
+# op.c
use warnings 'redefine' ;
sub fred {}
sub fred {}