Update some docs to explain that Perl no longer has a 2038 bug.
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index 3434cd7..775e274 100644 (file)
@@ -131,7 +131,7 @@ for example, turn C<-w -U> into C<-wU>.
 
 (F) msgsnd() requires a string at least as long as sizeof(long).
 
-=item %s argument is not a HASH or ARRAY element
+=item %s argument is not a HASH or ARRAY element or a subroutine
 
 (F) The argument to exists() must be a hash or array element or a
 subroutine with an ampersand, such as:
@@ -142,12 +142,11 @@ subroutine with an ampersand, such as:
 
 =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 or a
-subroutine name, such as:
+(F) The argument to delete() must be either a hash or array element,
+such as:
 
     $foo{$bar}
     $ref->{"susie"}[12]
-    &do_something
 
 or a hash or array slice, such as:
 
@@ -2259,6 +2258,15 @@ L<perlfunc/listen>.
 (F) There is currently a limit on the length of string which lookbehind can
 handle. This restriction may be eased in a future release. 
 
+=item Lost precision when %s %f by 1
+
+(W) The value you attempted to increment or decrement by one is too large
+for the underlying floating point representation to store accurately,
+hence the target of C<++> or C<--> is unchanged. Perl issues this warning
+because it has already switched from integers to floating point when values
+are too large for integers, and now even floating point is insufficient.
+You may wish to switch to using L<Math::BigInt> explicitly.
+
 =item lstat() on filehandle %s
 
 (W io) You tried to do an lstat on a filehandle.  What did you mean
@@ -3181,6 +3189,11 @@ then discovered it wasn't a subroutine or eval context.
 
 (P) scan_num() got called on something that wasn't a number.
 
+=item panic: sv_chop %s
+
+(P) The sv_chop() routine was passed a position that is not within the
+scalar's string buffer.
+
 =item panic: sv_insert
 
 (P) The sv_insert() routine was told to remove more string than there
@@ -3295,11 +3308,6 @@ fine from VMS' perspective, it's probably not what you intended.
 
 (F) The unpack format P must have an explicit size, not "*".
 
-=item B<-P> not allowed for setuid/setgid script
-
-(F) The script would have to be opened by the C preprocessor by name,
-which provides a race condition that breaks security.
-
 =item POSIX class [:%s:] unknown in regex; marked by <-- HERE in m/%s/
 
 (F) The class in the character class [: :] syntax is unknown.  The <-- HERE
@@ -3411,6 +3419,20 @@ but there was no array C<@foo> in scope at the time. If you wanted a
 literal @foo, then write it as \@foo; otherwise find out what happened
 to the array you apparently lost track of.
 
+=item Possible unintended interpolation of $\ in regex
+
+(W ambiguous) You said something like C<m/$\/> in a regex.
+The regex C<m/foo$\s+bar/m> translates to: match the word 'foo', the output
+record separartor (see L<perlvar/$\>) and the letter 's' (one time or more)
+followed by the word 'bar'.
+
+If this is what you intended then you can silence the warning by using 
+C<m/${\}/> (for example: C<m/foo${\}s+bar/>).
+
+If instead you intended to match the word 'foo' at the end of the line
+followed by whitespace and the word 'bar' on the next line then you can use
+C<m/$(?)\/> (for example: C<m/foo$(?)\s+bar/>).
+
 =item pragma "attrs" is deprecated, use "sub NAME : ATTRS" instead
 
 (D deprecated) You have written something like this:
@@ -3466,6 +3488,11 @@ port.  One can easily disable this by appropriate sighandlers, see
 L<perlipc/"Signals">.  See also "Process terminated by SIGTERM/SIGINT"
 in L<perlos2>.
 
+=item Prototype after '%c' for %s : %s
+
+(W syntax) A character follows % or @ in a prototype. This is useless,
+since % and @ gobble the rest of the subroutine arguments.
+
 =item Prototype mismatch: %s vs %s
 
 (S prototype) The subroutine being declared or defined had previously been
@@ -4936,19 +4963,6 @@ the version number.
 (W misc) The version string contains invalid characters at the end, which
 are being ignored.
 
-=item v-string in use/require is non-portable
-
-(W portable) The use of v-strings is non-portable to older, pre-5.6, Perls.
-If you want your scripts to be backward portable, use the floating
-point version number: for example, instead of C<use 5.6.1> say
-C<use 5.006_001>.  This of course won't help: the older Perls
-won't suddenly start understanding newer features, but at least
-they will show a sensible error message indicating the required
-minimum version.
-
-This warning is suppressed if the C<use 5.x.y> is preceded by a
-C<use 5.006> (see C<use VERSION> in L<perlfunc/use>).
-
 =item Warning: something's wrong
 
 (W) You passed warn() an empty string (the equivalent of C<warn "">) or