This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for perlbug changes.
[perl5.git] / pod / perldiag.pod
index 06dd5d4..00700c5 100644 (file)
@@ -561,6 +561,11 @@ checking.  Alternatively, if you are certain that you're calling the
 function correctly, you may put an ampersand before the name to avoid
 the warning.  See L<perlsub>.
 
+=item Calling POSIX::%s() is deprecated
+
+(D deprecated) You called a function whose use is deprecated.  See
+the function's name in L<POSIX> for details.
+
 =item Cannot compress integer in pack
 
 (F) An argument to pack("w",...) was too large to compress.  The BER
@@ -1299,15 +1304,18 @@ or if you use an explicit C<continue>.)
 with an assignment operator, which implies modifying the value itself.
 Perhaps you need to copy the value to a temporary, and repeat that.
 
-=item Character following "\c" must be ASCII
+=item Character following "\c" must be printable ASCII
 
-(F)(D deprecated, syntax) In C<\cI<X>>, I<X> must be an ASCII character.
-It is planned to make this fatal in all instances in Perl v5.20.  In
+(F)(D deprecated, syntax) In C<\cI<X>>, I<X> must be a printable
+(non-control) ASCII character.  This is fatal starting in v5.20 for
+non-ASCII characters, and it is planned to make this fatal in all
+instances in Perl v5.22.  In
 the cases where it isn't fatal, the character this evaluates to is
 derived by exclusive or'ing the code point of this character with 0x40.
 
-Note that non-alphabetic ASCII characters are discouraged here as well,
-and using non-printable ones will be deprecated starting in v5.18.
+Note that ASCII characters that don't map to control characters are
+discouraged here as well, and will generate the warning (when enabled)
+L</""\c%c" is more clearly written simply as "%s"">.
 
 =item Character in 'C' format wrapped in pack
 
@@ -1433,7 +1441,7 @@ but not higher.  Code points above 0xFFFF_FFFF require larger than a
 =item %s: Command not found
 
 (A) You've accidentally run your script through B<csh> or another shell
-shell instead of Perl.  Check the #! line, or manually feed your script
+instead of Perl.  Check the #! line, or manually feed your script
 into Perl yourself.  The #! line at the top of your file could look like
 
   #!/usr/bin/perl -w
@@ -1472,7 +1480,7 @@ L<charnames/CUSTOM TRANSLATORS>) returned an undefined value.
 
 (F) The parser found inconsistencies while attempting to define an
 overloaded constant.  Perhaps you forgot to load the corresponding
-L<overload> pragma?.
+L<overload> pragma?
 
 =item Constant is not %s reference
 
@@ -1922,7 +1930,7 @@ L<perlrecharclass/Extended Bracketed Character Classes>.
 
 (F) To use subroutine signatures, you must first enable them:
 
-    no warnings "experimental:signatures";
+    no warnings "experimental::signatures";
     use feature "signatures";
     sub foo ($left, $right) { ... }
 
@@ -3218,10 +3226,12 @@ local() if you want to localize a package variable.
 (W once) Typographical errors often show up as unique variable
 names.  If you had a good reason for having a unique name, then
 just mention it again somehow to suppress the message.  The C<our>
-declaration is provided for this purpose.
+declaration is also provided for this purpose.
 
-NOTE: This warning detects symbols that have been used only once
-so $c, @c, %c, *c, &c, sub c{}, c(), and c (the filehandle or
+NOTE: This warning detects package symbols that have been used only
+once. This means lexical variables will never trigger this warning.
+It also means that all of the package variables $c, @c, %c, as well
+as *c, &c, sub c{}, c(), and c (the filehandle or
 format) are considered the same; if a program uses $c only once
 but also uses any of the others it will not trigger this warning.
 Symbols beginning with an underscore and symbols using special
@@ -4972,14 +4982,6 @@ didn't think so.
 forget to check the return value of your socket() call?  See
 L<perlfunc/setsockopt>.
 
-=item Setting $/ to a %s reference is forbidden
-
-(F) You tried to assign a reference to a non integer to C<$/>.  In older
-Perls this would have behaved similarly to setting it to a reference to
-a positive integer, where the integer was the address of the reference.
-As of Perl 5.20.0 this is a fatal error, to allow future versions of Perl
-to use non-integer refs for more interesting purposes.
-
 =item Setting $/ to a reference to %s as a form of slurp is deprecated, treating as undef
 
 (W deprecated) You assigned a reference to a scalar to C<$/> where the
@@ -4996,6 +4998,14 @@ You are recommended to change your code to set C<$/> to C<undef> explicitly
 if you wish to slurp the file. In future versions of Perl assigning
 a reference to will throw a fatal error.
 
+=item Setting $/ to %s reference is forbidden
+
+(F) You tried to assign a reference to a non integer to C<$/>.  In older
+Perls this would have behaved similarly to setting it to a reference to
+a positive integer, where the integer was the address of the reference.
+As of Perl 5.20.0 this is a fatal error, to allow future versions of Perl
+to use non-integer refs for more interesting purposes.
+
 =item shift on reference is experimental
 
 (S experimental::autoderef) C<shift> with a scalar argument is experimental
@@ -6456,7 +6466,7 @@ You need to add either braces or blanks to disambiguate.
 
 (D deprecated) You tried to use a hash as a reference, as in
 C<< %foo->{"bar"} >> or C<< %$ref->{"hello"} >>.  Versions of perl <= 5.6.1
-used to allow this syntax, but shouldn't have.   It is now
+used to allow this syntax, but shouldn't have.  It is now
 deprecated, and will be removed in a future version.
 
 =item Using an array as a reference is deprecated
@@ -6732,6 +6742,6 @@ shows whereabouts in the regular expression the problem was discovered.
 
 =head1 SEE ALSO
 
-L<warnings>, L<perllexwarn>, L<diagnostics>.
+L<warnings>, L<diagnostics>.
 
 =cut