mention how to look up perllocal.pod (from Michael G Schwern)
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index 8701714..a988124 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:
 
@@ -1255,15 +1255,12 @@ 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
 
@@ -2529,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
@@ -3035,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