make parenthetic warnings look consistent; make diagnostic on
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index 05e57c0..7e41e53 100644 (file)
@@ -161,14 +161,14 @@ an ampersand before the name to avoid the warning.  See L<perlsub>.
 (F) The argument to exists() must be a hash or array element, such as:
 
     $foo{$bar}
-    $ref->[12]->["susie"]
+    $ref->{"susie"}[12]
 
 =item %s argument is not a HASH or ARRAY element or slice
 
 (F) The argument to delete() must be either a hash or array element, such as:
 
     $foo{$bar}
-    $ref->[12]->["susie"]
+    $ref->{"susie"}[12]
 
 or a hash or array slice, such as:
 
@@ -248,7 +248,7 @@ Perl yourself.
 instead of Perl.  Check the #! line, or manually feed your script
 into Perl yourself.
 
-=item         (in cleanup) %s
+=item (in cleanup) %s
 
 (W misc) This prefix usually indicates that a DESTROY() method raised
 the indicated exception.  Since destructors are usually called by
@@ -260,7 +260,7 @@ repeated.
 Failure of user callbacks dispatched using the C<G_KEEPERR> flag
 could also result in this warning.  See L<perlcall/G_KEEPERR>.
 
-=item         (Missing semicolon on previous line?)
+=item (Missing semicolon on previous line?)
 
 (S) This is an educated guess made in conjunction with the message "%s
 found where operator expected".  Don't automatically put a semicolon on
@@ -298,7 +298,7 @@ the string being unpacked.  See L<perlfunc/pack>.
 
 =item <> should be quotes
 
-(F) You wrote C<require E<lt>fileE<gt>> when you should have written
+(F) You wrote C<< require <file> >> when you should have written
 C<require 'file'>.
 
 =item accept() on closed socket %s
@@ -576,7 +576,7 @@ so it was truncated to the string shown.
 
 =item Callback called exit
 
-(F) A subroutine invoked from an external package via perl_call_sv()
+(F) A subroutine invoked from an external package via call_sv()
 exited by calling exit.
 
 =item Can't "goto" out of a pseudo block
@@ -771,7 +771,7 @@ your sysadmin why he and/or she removed it.
 (F) This machine doesn't have either waitpid() or wait4(), so only waitpid()
 without flags is emulated.
 
-=item Can't do {n,m} with n E<gt> m
+=item Can't do {n,m} with n > m
 
 (F) Minima must be less than or equal to maxima.  If you really want
 your regexp to match something 0 times, just put {0}.  See L<perlre>.
@@ -897,10 +897,10 @@ package name.
 
 =item Can't localize pseudo-hash element
 
-(F) You said something like C<local $ar-E<gt>{'key'}>, where $ar is
+(F) You said something like C<< local $ar->{'key'} >>, where $ar is
 a reference to a pseudo-hash.  That hasn't been implemented yet, but
 you can get a similar effect by localizing the corresponding array
-element directly -- C<local $ar-E<gt>[$ar-E<gt>[0]{'key'}]>.
+element directly -- C<< local $ar->[$ar->[0]{'key'}] >>.
 
 =item Can't locate auto/%s.al in @INC
 
@@ -956,7 +956,7 @@ buffer.
 
 =item Can't open %s: %s
 
-(S inplace) The implicit opening of a file through use of the C<E<lt>E<gt>>
+(S inplace) The implicit opening of a file through use of the C<< <> >>
 filehandle, either implicitly under the C<-n> or C<-p> command-line
 switches, or explicitly, failed for the indicated reason.  Usually this
 is because you don't have read permission for a file which you named
@@ -966,24 +966,24 @@ on the command line.
 
 (W pipe) You tried to say C<open(CMD, "|cmd|")>, which is not supported.  You can
 try any of several modules in the Perl library to do this, such as
-IPC::Open2.  Alternately, direct the pipe's output to a file using "E<gt>",
+IPC::Open2.  Alternately, direct the pipe's output to a file using ">",
 and then read it in under a different file handle.
 
 =item Can't open error file %s as stderr
 
 (F) An error peculiar to VMS.  Perl does its own command line redirection, and
-couldn't open the file specified after '2E<gt>' or '2E<gt>E<gt>' on the
+couldn't open the file specified after '2>' or '2>>' on the
 command line for writing.
 
 =item Can't open input file %s as stdin
 
 (F) An error peculiar to VMS.  Perl does its own command line redirection, and
-couldn't open the file specified after 'E<lt>' on the command line for reading.
+couldn't open the file specified after '<' on the command line for reading.
 
 =item Can't open output file %s as stdout
 
 (F) An error peculiar to VMS.  Perl does its own command line redirection, and
-couldn't open the file specified after 'E<gt>' or 'E<gt>E<gt>' on the command
+couldn't open the file specified after '>' or '>>' on the command
 line for writing.
 
 =item Can't open output pipe (name: %s)
@@ -1090,7 +1090,7 @@ provide symbolic names for C<$!> errno values.
 =item Can't use "my %s" in sort comparison
 
 (F) The global variables $a and $b are reserved for sort comparisons.
-You mentioned $a or $b in the same line as the E<lt>=E<gt> or cmp operator,
+You mentioned $a or $b in the same line as the <=> or cmp operator,
 and the variable had earlier been declared as a lexical variable.
 Either qualify the sort variable with the package name, or rename the
 lexical variable.
@@ -1208,7 +1208,7 @@ backslash: "\[=" and "=\]".
 not realizing that 777 will be interpreted as a decimal number, equivalent
 to 01411.  Octal constants are introduced with a leading 0 in Perl, as in C.
 
-=item Close on unopened file E<lt>%sE<gt>
+=item Close on unopened file <%s>
 
 (W unopened) You tried to close a filehandle that was never opened.
 
@@ -1255,20 +1255,21 @@ workarounds.
 inlining.  See L<perlsub/"Constant Functions"> for commentary and
 workarounds.
 
-=item constant(%s): %%^H is not localized
-
-(F) When setting compile-time-lexicalized hash %^H one should set the 
-corresponding bit of $^H as well.
-
 =item constant(%s): %s
 
-(F) Compile-time-substitutions (such as overloaded constants and
-character names) were not correctly set up.
+(F) The parser found inconsistencies either while attempting to define an
+overloaded constant, or when trying to find the character name specified
+in the C<\N{...}> escape.  Perhaps you forgot to load the corresponding
+C<overload> or C<charnames> pragma?  See L<charnames> and L<overload>.
 
 =item Copy method did not return a reference
 
 (F) The method which overloads "=" is buggy. See L<overload/Copy Constructor>.
 
+=item CORE::%s is not a keyword
+
+(F) The CORE:: namespace is reserved for Perl keywords.
+
 =item Corrupt malloc ptr 0x%lx at 0x%lx
 
 (P) The malloc package that comes with Perl had an internal failure.
@@ -1304,7 +1305,7 @@ just use C<if (%hash) { # not empty }> for example.
 
 =item Delimiter for here document is too long
 
-(F) In a here document construct like C<E<lt>E<lt>FOO>, the label
+(F) In a here document construct like C<<<FOO>, the label
 C<FOO> is too long for Perl to handle.  You have to be seriously
 twisted to write code that triggers this error.
 
@@ -1312,16 +1313,16 @@ twisted to write code that triggers this error.
 
 See Server error.
 
-=item Did you mean &%s instead?
+=item (Did you mean &%s instead?)
 
 (W) You probably referred to an imported subroutine &FOO as $FOO or some such.
 
-=item Did you mean "local" instead of "our"?
+=item (Did you mean "local" instead of "our"?)
 
 (W misc) Remember that "our" does not localize the declared global variable.
 You have declared it again in the same lexical scope, which seems superfluous.
 
-=item Did you mean $ or @ instead of %?
+=item (Did you mean $ or @ instead of %?)
 
 (W) You probably said %hash{$key} when you meant $hash{$key} or @hash{@keys}.
 On the other hand, maybe you just meant %hash and got carried away.
@@ -1331,7 +1332,7 @@ On the other hand, maybe you just meant %hash and got carried away.
 (F) You passed die() an empty string (the equivalent of C<die "">) or
 you called it with no args and both C<$@> and C<$_> were empty.
 
-=item Do you need to predeclare %s?
+=item (Do you need to predeclare %s?)
 
 (S) This is an educated guess made in conjunction with the message "%s
 found where operator expected".  It often means a subroutine or module
@@ -1480,16 +1481,16 @@ the FileHandle package.
 
 (W io) You tried to write on a read-only filehandle.  If you
 intended it to be a read-write filehandle, you needed to open it with
-"+E<lt>" or "+E<gt>" or "+E<gt>E<gt>" instead of with "E<lt>" or nothing.  If
-you intended only to write the file, use "E<gt>" or "E<gt>E<gt>".  See
+"+<" or "+>" or "+>>" instead of with "<" or nothing.  If
+you intended only to write the file, use ">" or ">>".  See
 L<perlfunc/open>.
 
 =item Filehandle %s opened only for output
 
 (W io) You tried to read from a filehandle opened only for writing.  If you
 intended it to be a read/write filehandle, you needed to open it with
-"+E<lt>" or "+E<gt>" or "+E<gt>E<gt>" instead of with "E<lt>" or nothing.  If
-you intended only to read from the file, use "E<lt>".  See
+"+<" or "+>" or "+>>" instead of with "<" or nothing.  If
+you intended only to read from the file, use "<".  See
 L<perlfunc/open>.
 
 =item Final $ should be \$ or $name
@@ -1561,7 +1562,7 @@ C<getpwnam> operator returned an invalid UIC.
 =item glob failed (%s)
 
 (W glob) Something went wrong with the external program(s) used for C<glob>
-and C<E<lt>*.cE<gt>>.  Usually, this means that you supplied a C<glob>
+and C<< <*.c> >>.  Usually, this means that you supplied a C<glob>
 pattern that caused the external program to fail and exit with a nonzero
 status.  If the message indicates that the abnormal exit resulted in a
 coredump, this may also mean that your csh (C shell) is broken.  If so,
@@ -1866,7 +1867,7 @@ double-quotish context.
 (W pipe) You used the C<open(FH, "| command")> or C<open(FH, "command |")>
 construction, but the command was missing or blank.
 
-=item Missing operator before %s?
+=item (Missing operator before %s?)
 
 (S) This is an educated guess made in conjunction with the message "%s
 found where operator expected".  Often the missing operator is a comma.
@@ -2003,28 +2004,28 @@ but for some reason the perl5db.pl file (or some facsimile thereof)
 didn't define a DB::sub routine to be called at the beginning of each
 ordinary subroutine call.
 
-=item No error file after 2E<gt> or 2E<gt>E<gt> on command line
+=item No error file after 2> or 2>> on command line
 
 (F) An error peculiar to VMS.  Perl handles its own command line redirection,
-and found a '2E<gt>' or a '2E<gt>E<gt>' on the command line, but can't find
+and found a '2>' or a '2>>' on the command line, but can't find
 the name of the file to which to write data destined for stderr.
 
-=item No input file after E<lt> on command line
+=item No input file after < on command line
 
 (F) An error peculiar to VMS.  Perl handles its own command line redirection,
-and found a 'E<lt>' on the command line, but can't find the name of the file
+and found a '<' on the command line, but can't find the name of the file
 from which to read data for stdin.
 
-=item No output file after E<gt> on command line
+=item No output file after > on command line
 
 (F) An error peculiar to VMS.  Perl handles its own command line redirection,
-and found a lone 'E<gt>' at the end of the command line, so it doesn't know
+and found a lone '>' at the end of the command line, so it doesn't know
 where you wanted to redirect stdout.
 
-=item No output file after E<gt> or E<gt>E<gt> on command line
+=item No output file after > or >> on command line
 
 (F) An error peculiar to VMS.  Perl handles its own command line redirection,
-and found a 'E<gt>' or a 'E<gt>E<gt>' on the command line, but can't find the
+and found a '>' or a '>>' on the command line, but can't find the
 name of the file to which to write data destined for stdout.
 
 =item No package name allowed for variable %s in "our"
@@ -2525,6 +2526,24 @@ Perl guesses a reasonable buffer size, but puts a sentinel byte at the
 end of the buffer just in case.  This sentinel byte got clobbered, and
 Perl assumes that memory is now corrupted.  See L<perlfunc/ioctl>.
 
+=item pragma "attrs" is deprecated, use "sub NAME : ATTRS" instead
+
+(W deprecated) You have written somehing like this:
+
+    sub doit
+    {
+        use attrs qw(locked);
+    }
+
+You should use the new declaration syntax instead.
+
+    sub doit : locked
+    {
+        ...
+
+The C<use attrs> pragma is now obsolete, and is only provided for
+backward-compatibility. See L<perlsub/"Subroutine Attributes">.
+
 =item Precedence problem: open %s should be open(%s)
 
 (S precedence) The old irregular construct
@@ -2766,7 +2785,7 @@ think so.
 
 =item seteuid() not implemented
 
-(F) You tried to assign to C<$E<gt>>, and your operating system doesn't support
+(F) You tried to assign to C<< $> >>, and your operating system doesn't support
 the seteuid() system call (or equivalent), or at least Configure didn't
 think so.
 
@@ -2783,7 +2802,7 @@ think so.
 
 =item setruid() not implemented
 
-(F) You tried to assign to C<$E<lt>>, and your operating system doesn't support
+(F) You tried to assign to C<$<>, and your operating system doesn't support
 the setruid() system call (or equivalent), or at least Configure didn't
 think so.
 
@@ -2813,7 +2832,7 @@ But before sort was a keyword, people sometimes used it as a filehandle.
 =item Sort subroutine didn't return a numeric value
 
 (F) A sort comparison routine must return a number.  You probably blew
-it by not using C<E<lt>=E<gt>> or C<cmp>, or by not using them correctly.
+it by not using C<< <=> >> or C<cmp>, or by not using them correctly.
 See L<perlfunc/sort>.
 
 =item Sort subroutine didn't return single value
@@ -2827,7 +2846,7 @@ or less than one element.  See L<perlfunc/sort>.
 more times than there are characters of input, which is what happened.)
 See L<perlfunc/split>.
 
-=item Stat on unopened file E<lt>%sE<gt>
+=item Stat on unopened file <%s>
 
 (W unopened) You tried to use the stat() function (or an equivalent file test)
 on a filehandle that was either never opened or has since been closed.
@@ -2949,7 +2968,7 @@ nested for Perl to reach.  Perl is doing you a favor by refusing.
 (W unopened) You tried to use the tell() function on a filehandle that was either
 never opened or has since been closed.
 
-=item Test on unopened file E<lt>%sE<gt>
+=item Test on unopened file <%s>
 
 (W unopened) You tried to invoke a file test operator on a filehandle that isn't
 open.  Check your logic.  See also L<perlfunc/-X>.
@@ -3031,6 +3050,14 @@ B<-T> option must appear on the command line: C<perl -T scriptname>.
 B<-M> or B<-m> option.  This is an error because B<-M> and B<-m> options
 are not intended for use inside scripts.  Use the C<use> pragma instead.
 
+=item Too late to run %s block
+
+(W void) A CHECK or INIT block is being defined during run time proper,
+when the opportunity to run them has already passed.  Perhaps you are
+loading a file with C<require> or C<do> when you should be using
+C<use> instead.  Or perhaps you should put the C<require> or C<do>
+inside a BEGIN block.
+
 =item Too many ('s
 
 =item Too many )'s
@@ -3156,8 +3183,8 @@ representative, who probably put it there in the first place.
 =item Unknown open() mode '%s'
 
 (F) The second argument of 3-argument open() is not among the list
-of valid modes: C<E<lt>>, C<E<gt>>, C<E<gt>E<gt>>, C<+E<lt>>,
-C<+E<gt>>, C<+E<gt>E<gt>>, C<-|>, C<|E<45>>.
+of valid modes: C<< < >>, C<< > >>, C<<< >> >>>, C<< +< >>,
+C<< +> >>, C<<< +>> >>>, C<-|>, C<|->.
 
 =item Unknown process %x sent message to prime_env_iter: %s
 
@@ -3241,7 +3268,7 @@ At least, Configure doesn't think so.
 (F) Your machine doesn't support the Berkeley socket mechanism, or at
 least that's what Configure thought.
 
-=item Unterminated E<lt>E<gt> operator
+=item Unterminated <> operator
 
 (F) The lexer saw a left angle bracket in a place where it was expecting
 a term, so it's looking for the corresponding right angle bracket, and not
@@ -3279,7 +3306,7 @@ action-at-a-distance effects of C<$*>.
 (F) You attempted to use a feature of printf that is accessible from
 only C.  This usually means there's a better way to do it in Perl.
 
-=item Use of bare E<lt>E<lt> to mean E<lt>E<lt>"" is deprecated
+=item Use of bare << to mean <<"" is deprecated
 
 (D deprecated) You are now encouraged to use the explicitly quoted form if you
 wish to use an empty line as the terminator of the here-document.
@@ -3292,10 +3319,10 @@ a split() explicitly to an array (or list).
 
 =item Use of inherited AUTOLOAD for non-method %s() is deprecated
 
-(D deprecated) As an (ahem) accidental feature, C<AUTOLOAD> subroutines are looked
-up as methods (using the C<@ISA> hierarchy) even when the subroutines to
-be autoloaded were called as plain functions (e.g. C<Foo::bar()>), not
-as methods (e.g. C<Foo-E<gt>bar()> or C<$obj-E<gt>bar()>).
+(D deprecated) As an (ahem) accidental feature, C<AUTOLOAD> subroutines are
+looked up as methods (using the C<@ISA> hierarchy) even when the subroutines
+to be autoloaded were called as plain functions (e.g.  C<Foo::bar()>),
+not as methods (e.g. C<< Foo->bar() >> or C<< $obj->bar() >>).
 
 This bug will be rectified in Perl 5.005, which will use method lookup
 only for methods' C<AUTOLOAD>s.  However, there is a significant base
@@ -3559,13 +3586,13 @@ substitution, but stylistically it's better to use the variable form
 because other Perl programmers will expect it, and it works better
 if there are more than 9 backreferences.
 
-=item '|' and 'E<lt>' may not both be specified on command line
+=item '|' and '<' may not both be specified on command line
 
 (F) An error peculiar to VMS.  Perl does its own command line redirection, and
 found that STDIN was a pipe, and that you also tried to redirect STDIN using
-'E<lt>'.  Only one STDIN stream to a customer, please.
+'<'.  Only one STDIN stream to a customer, please.
 
-=item '|' and 'E<gt>' may not both be specified on command line
+=item '|' and '>' may not both be specified on command line
 
 (F) An error peculiar to VMS.  Perl does its own command line redirection, and
 thinks you tried to redirect stdout both to a file and into a pipe to another