summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-19 05:44:20 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-19 05:44:20 +0000
commit34d09196f6a006314d7ea49a091a30ce5ee08bff (patch)
treeb65cd7762db1fdf88369274697efeec8fd03d22c /pod
parente28598cb7aa92733a853cea0cf64bb1d19ec6745 (diff)
downloadperl-34d09196f6a006314d7ea49a091a30ce5ee08bff.tar.gz
rename "Probable precendence problem" diagnostic to "Bareword found
in conditional" to better reflect the class of error (as suggested by Larry) p4raw-id: //depot/perl@5131
Diffstat (limited to 'pod')
-rw-r--r--pod/perldelta.pod24
-rw-r--r--pod/perldiag.pod24
2 files changed, 40 insertions, 8 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 46dd6564e4..3a2c296c91 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -1903,6 +1903,22 @@ most likely an unexpected right brace '}'.
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
@@ -2362,6 +2378,14 @@ appear in %ENV. This may be a benign occurrence, as some software packages
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
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 39112035fb..d87d08512c 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -509,6 +509,22 @@ Perhaps you need to predeclare a subroutine?
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.
@@ -2522,14 +2538,6 @@ Check your logic flow.
(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