Message-Id: <
8775B355-CCA2-11D6-AADE-000393414688@dolphin-services.de>
p4raw-id: //depot/perl@17931
}
}
if (first->op_type == OP_CONST) {
- if (ckWARN(WARN_BAREWORD) && (first->op_private & OPpCONST_BARE))
- Perl_warner(aTHX_ packWARN(WARN_BAREWORD), "Bareword found in conditional");
+ if (ckWARN(WARN_BAREWORD) && (first->op_private & OPpCONST_BARE)) {
+ if (first->op_private & OPpCONST_BARE)
+ no_bareword_allowed(first);
+ else
+ Perl_warner(aTHX_ packWARN(WARN_BAREWORD), "Bareword found in conditional");
+ }
if ((type == OP_AND) == (SvTRUE(((SVOP*)first)->op_sv))) {
op_free(first);
*firstp = Nullop;
EXPECT
Bareword "XYZ" not allowed while "strict subs" in use at - line 5.
Execution of - aborted due to compilation errors.
+########
+
+# [perl #10021]
+use strict;
+use warnings;
+print "" if BAREWORD;
+EXPECT
+Bareword "BAREWORD" not allowed while "strict subs" in use at - line 5
+Execution of - aborted due to compilation errors.