}
if (first->op_type == OP_CONST) {
if (ckWARN(WARN_PRECEDENCE) && (first->op_private & OPpCONST_BARE))
- Perl_warner(aTHX_ WARN_PRECEDENCE, "Probable precedence problem on %s",
- PL_op_desc[type]);
+ Perl_warner(aTHX_ WARN_PRECEDENCE, "Bareword found in conditional");
if ((type == OP_AND) == (SvTRUE(((SVOP*)first)->op_sv))) {
op_free(first);
*firstp = Nullop;
malloc()ed in the first place. Mandatory, but can be disabled by
setting environment variable C<PERL_BADFREE> to 1.
+=item Bareword found in conditional
+
+(W) The compiler found a bareword where it expected a conditional,
+which often indicates that an || or && was parsed as part of the
+last argument of the previous construct, for example:
+
+ open FOO || die;
+
+It may also indicate a misspelled constant that has been interpreted
+as a bareword:
+
+ use constant TYPO => 1;
+ if (TYOP) { print "foo" }
+
+The C<strict> pragma is useful in avoiding such errors.
+
=item Binary number > 0b11111111111111111111111111111111 non-portable
(W) The binary number you specified is larger than 2**32-1
might directly modify logical name tables and introduce nonstandard names,
or it may indicate that a logical name table has been corrupted.
+=item Probable precedence problem on %s
+
+(W) The compiler found a bareword where it expected a conditional,
+which often indicates that an || or && was parsed as part of the
+last argument of the previous construct, for example:
+
+ open FOO || die;
+
=item regexp too big
(F) The current implementation of regular expressions uses shorts as
the compiler saw no other uses of that namespace before that point.
Perhaps you need to predeclare a package?
+=item Bareword found in conditional
+
+(W) The compiler found a bareword where it expected a conditional,
+which often indicates that an || or && was parsed as part of the
+last argument of the previous construct, for example:
+
+ open FOO || die;
+
+It may also indicate a misspelled constant that has been interpreted
+as a bareword:
+
+ use constant TYPO => 1;
+ if (TYOP) { print "foo" }
+
+The C<strict> pragma is useful in avoiding such errors.
+
=item BEGIN failed--compilation aborted
(F) An untrapped exception was raised while executing a BEGIN subroutine.
(W) The filehandle you're writing to got itself closed sometime before now.
Check your logic flow.
-=item Probable precedence problem on %s
-
-(W) The compiler found a bareword where it expected a conditional,
-which often indicates that an || or && was parsed as part of the
-last argument of the previous construct, for example:
-
- open FOO || die;
-
=item Prototype mismatch: %s vs %s
(S) The subroutine being declared or defined had previously been declared
Parentheses missing around "local" list at -e line 1.
local $a, $b = (1,2);
- Probable precedence problem on logical or at -e line 1.
+ Bareword found in conditional at -e line 1.
use warnings 'syntax'; my $x = print(ABC || 1);
Value of %s may be \"0\"; use \"defined\"
no warnings 'syntax' ;
print (ABC || 1) ;
EXPECT
-Probable precedence problem on logical or (||) at - line 3.
+Bareword found in conditional at - line 3.
########
--FILE-- abc