T_w_e_a_k_a_g_e.
[p5sagit/p5-mst-13.2.git] / pod / perldiag.pod
index bba1320..a594f53 100644 (file)
@@ -16,7 +16,7 @@ desperation):
     (A) An alien error message (not generated by Perl).
 
 The majority of messages from the first three classifications above
-(W, D & S) can be controlled using the C<warnings> pragma. 
+(W, D & S) can be controlled using the C<warnings> pragma.
 
 If a message can be controlled by the C<warnings> pragma, its warning
 category is included with the classification letter in the description
@@ -76,6 +76,13 @@ on the operator (e.g. C<CORE::log($x)>) or by declaring the subroutine
 to be an object method (see L<perlsub/"Subroutine Attributes"> or
 L<attributes>).
 
+=item Ambiguous range in transliteration operator
+
+(F) You wrote something like C<tr/a-z-0//> which doesn't mean anything at
+all.  To include a C<-> character in a transliteration, put it either
+first or last.  (In the past, C<tr/a-z-0//> was synonymous with
+C<tr/a-y//>, which was probably not what you would have expected.)
+
 =item Ambiguous use of %s resolved as %s
 
 (W ambiguous)(S) You said something that may not be interpreted the way
@@ -175,6 +182,29 @@ spots.  This is now heavily deprecated.
 must either both be scalars or both be lists.  Otherwise Perl won't
 know which context to supply to the right side.
 
+=item Negative offset to vec in lvalue context
+
+(F) When vec is called in an lvalue context, the second argument must be
+greater than or equal to zero.
+
+=item Attempt to bless into a reference
+
+(F) The CLASSNAME argument to the bless() operator is expected to be
+the name of the package to bless the resulting object into. You've
+supplied instead a reference to something: perhaps you wrote
+
+    bless $self, $proto;
+
+when you intended
+
+    bless $self, ref($proto) || $proto;
+
+If you actually want to bless into the stringified version
+of the reference supplied, you need to stringify it yourself, for
+example by:
+
+    bless $self, "$proto";
+
 =item Attempt to free non-arena SV: 0x%lx
 
 (P internal) All SV objects are supposed to be allocated from arenas
@@ -254,9 +284,9 @@ open(), or did it in another package.
 
 (S malloc) An internal routine called free() on something that had never
 been malloc()ed in the first place. Mandatory, but can be disabled by
-setting environment variable C<PERL_BADFREE> to 1.
+setting environment variable C<PERL_BADFREE> to 0.
 
-This message can be quite often seen with DB_File on systems with "hard"
+This message can be seen quite often with DB_File on systems with "hard"
 dynamic linking, like C<AIX> and C<OS/2>. It is a bug of C<Berkeley DB>
 which is left unnoticed if C<DB> uses I<forgiving> system malloc().
 
@@ -372,6 +402,11 @@ L<perlport> for more on portability concerns.
 (W closed) You tried to do a bind on a closed socket.  Did you forget to
 check the return value of your socket() call?  See L<perlfunc/bind>.
 
+=item binmode() on closed filehandle %s
+
+(W unopened) You tried binmode() on a filehandle that was never opened.
+Check you control flow and number of arguments.
+
 =item Bit vector size > 32 non-portable
 
 (W portable) Using bit vector sizes larger than 32 is non-portable.
@@ -379,7 +414,7 @@ check the return value of your socket() call?  See L<perlfunc/bind>.
 =item Bizarre copy of %s in %s
 
 (P) Perl detected an attempt to copy an internal value that is not
-copiable.
+copyable.
 
 =item B<-P> not allowed for setuid/setgid script
 
@@ -419,12 +454,6 @@ L<perlfunc/pack>.
 (F) Only hard references may be blessed.  This is how Perl "enforces"
 encapsulation of objects.  See L<perlobj>.
 
-=item Can't break at that line
-
-(S internal) A warning intended to only be printed while running within
-the debugger, indicating the line number specified wasn't the location
-of a statement that could be stopped at.
-
 =item Can't call method "%s" in empty package "%s"
 
 (F) You called a method correctly, and it correctly indicated a package
@@ -538,10 +567,11 @@ C<-i.bak>, or some such.
 characters and Perl was unable to create a unique filename during
 inplace editing with the B<-i> switch.  The file was ignored.
 
-=item Can't do {n,m} with n > m
+=item Can't do {n,m} with n > m before << HERE in regex m/%s/
 
-(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>.
+(F) Minima must be less than or equal to maxima. If you really want your
+regexp to match something 0 times, just put {0}. The << HERE shows in the
+regular expression about where the problem was discovered. See L<perlre>.
 
 =item Can't do setegid!
 
@@ -598,6 +628,13 @@ found in the PATH did not have correct permissions.
 (F) A string of a form C<CORE::word> was given to prototype(), but there
 is no builtin with the name C<word>.
 
+=item Can't find %s character property "%s"
+
+(F) You used C<\p{}> or C<\P{}> but the character property by that name
+could not be find.  Maybe you mispelled the name of the property
+(remember that the names of character properties consist only of
+alphanumeric characters), or maybe you forgot the C<Is> or C<In> prefix?
+
 =item Can't find label %s
 
 (F) You said to goto a label that isn't mentioned anywhere that it's
@@ -626,6 +663,13 @@ If you're getting this error from a here-document, you may have included
 unseen whitespace before or after your closing tag. A good programmer's
 editor will have a way to help you find these characters.
 
+=item Can't find %s property definition %s
+
+(F) You may have tried to use C<\p> which means a Unicode property for
+example \p{Lu} is all uppercase letters.  Escape the C<\p>, either
+C<\\p> (just the C<\p>) or by C<\Q\p> (the rest of the string, until
+possible C<\E>).
+
 =item Can't fork
 
 (F) A fatal error occurred while trying to fork while opening a
@@ -722,7 +766,7 @@ directly -- C<< local $ar->[$ar->[0]{'key'}] >>.
 (F) You said something like C<local $$ref>, which Perl can't currently
 handle, because when it goes to restore the old value of whatever $ref
 pointed to after the scope of the local() is finished, it can't be sure
-that $ref will still be a reference.  
+that $ref will still be a reference.
 
 =item Can't locate %s
 
@@ -747,6 +791,12 @@ the file, say, by doing C<make install>.
 functioning as a class, but that package doesn't define that particular
 method, nor does any of its base classes.  See L<perlobj>.
 
+=item (perhaps you forgot to load "%s"?)
+
+(F) This is an educated guess made in conjunction with the message
+"Can't locate object method \"%s\" via package \"%s\"".  It often means
+that a method requires a package that has not been loaded.
+
 =item Can't locate package %s for @%s::ISA
 
 (W syntax) The @ISA array contained the name of another package that
@@ -825,7 +875,7 @@ the command line for writing.
 redirection, and couldn't open the pipe into which to send data destined
 for stdout.
 
-=item Can't open perl script "%s": %s
+=item Can't open perl script%s: %s
 
 (F) The script you specified can't be opened for the indicated reason.
 
@@ -853,7 +903,7 @@ or grep().  You can usually double the curlies to get the same effect
 though, because the inner curlies will be considered a block that
 loops once.  See L<perlfunc/redo>.
 
-=item Can't remove %s: %s, skipping file 
+=item Can't remove %s: %s, skipping file
 
 (S inplace) You requested an inplace edit without creating a backup
 file.  Perl was unable to remove the original file to replace it with
@@ -886,6 +936,14 @@ suidperl.
 temporary or readonly values) from a subroutine used as an lvalue.  This
 is not allowed.
 
+=item Can't return %s to lvalue scalar context
+
+(F) You tried to return a complete array or hash from an lvalue subroutine,
+but you called the subroutine in a way that made Perl think you meant
+to return only one value. You probably meant to write parentheses around
+the call to the subroutine, which tell Perl that the call should be in
+list context.
+
 =item Can't return outside a subroutine
 
 (F) The return statement was executed in mainline code, that is, where
@@ -943,12 +1001,18 @@ calling sv_upgrade.
 (F) A value used as either a hard reference or a symbolic reference must
 be a defined value.  This helps to delurk some insidious errors.
 
+=item Can't use anonymous symbol table for method lookup
+
+(P) The internal routine that does method lookup was handed a symbol
+table that doesn't have a name.  Symbol tables can become anonymous
+for example by undefining stashes: C<undef %Some::Package::>.
+
 =item Can't use bareword ("%s") as %s ref while "strict refs" in use
 
 (F) Only hard references are allowed by "strict refs".  Symbolic
 references are disallowed.  See L<perlref>.
 
-=item Can't use %%! because Errno.pm is not available
+=item Can't use %! because Errno.pm is not available
 
 (F) The first time the %! hash is used, perl automatically loads the
 Errno.pm module. The Errno module is expected to tie the %! hash to
@@ -1012,35 +1076,6 @@ references can be weakened.
 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 class syntax [%s] belongs inside character classes
-
-(W unsafe) The character class constructs [: :], [= =], and [. .]  go
-I<inside> character classes, the [] are part of the construct, for
-example: /[012[:alpha:]345]/.  Note that [= =] and [. .] are not
-currently implemented; they are simply placeholders for future
-extensions.
-
-=item Character class syntax [. .] is reserved for future extensions
-
-(W regexp) Within regular expression character classes ([]) the syntax
-beginning with "[." and ending with ".]" is reserved for future
-extensions.  If you need to represent those character sequences inside a
-regular expression character class, just quote the square brackets with
-the backslash: "\[." and ".\]".
-
-=item Character class syntax [= =] is reserved for future extensions
-
-(W regexp) Within regular expression character classes ([]) the syntax
-beginning with "[=" and ending with "=]" is reserved for future
-extensions.  If you need to represent those character sequences inside a
-regular expression character class, just quote the square brackets with
-the backslash: "\[=" and "=\]".
-
-=item Character class [:%s:] unknown
-
-(F) The class in the character class [: :] syntax is unknown.  See
-L<perlre>.
-
 =item chmod() mode argument is missing initial 0
 
 (W chmod) A novice will sometimes say
@@ -1051,7 +1086,7 @@ 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 <%s>
+=item close() on unopened filehandle %s
 
 (W unopened) You tried to close a filehandle that was never opened.
 
@@ -1075,7 +1110,7 @@ arbitrarily.  ("Simple" and "medium" situations are handled without
 recursion and are not subject to a limit.)  Try shortening the string
 under examination; looping in Perl code (e.g. with C<while>) rather than
 in the regular expression engine; or rewriting the regular expression so
-that it is simpler or backtracks less.  (See L<perlbook> for information
+that it is simpler or backtracks less.  (See L<perlfaq2> for information
 on I<Mastering Regular Expressions>.)
 
 =item connect() on closed socket %s
@@ -1084,7 +1119,7 @@ on I<Mastering Regular Expressions>.)
 to check the return value of your socket() call?  See
 L<perlfunc/connect>.
 
-=item constant(%s): %s
+=item Constant(%s)%s: %s
 
 (F) The parser found inconsistencies either while attempting to define
 an overloaded constant, or when trying to find the character name
@@ -1114,8 +1149,8 @@ workarounds.
 
 =item Copy method did not return a reference
 
-(F) The method which overloads "=" is buggy. See L<overload/Copy
-Constructor>.
+(F) The method which overloads "=" is buggy. See
+L<overload/Copy Constructor>.
 
 =item CORE::%s is not a keyword
 
@@ -1157,13 +1192,13 @@ which case it indicates something else.
 
 (D deprecated) defined() is not usually useful on arrays because it
 checks for an undefined I<scalar> value.  If you want to see if the
-array is empty, just use C<if (@array) { # not empty }> for example.  
+array is empty, just use C<if (@array) { # not empty }> for example.
 
 =item defined(%hash) is deprecated
 
 (D deprecated) defined() is not usually useful on hashes because it
 checks for an undefined I<scalar> value.  If you want to see if the hash
-is empty, just use C<if (%hash) { # not empty }> for example.  
+is empty, just use C<if (%hash) { # not empty }> for example.
 
 =item Delimiter for here document is too long
 
@@ -1347,12 +1382,6 @@ you which section of the Perl source code is distressed.
 (F) Your machine apparently doesn't implement fcntl().  What is this, a
 PDP-11 or something?
 
-=item Filehandle %s never opened
-
-(W unopened) An I/O operation was attempted on a filehandle that was
-never initialized.  You need to do an open() or a socket() call, or call
-a constructor from the FileHandle package.
-
 =item Filehandle %s opened only for input
 
 (W io) You tried to write on a read-only filehandle.  If you intended it
@@ -1384,14 +1413,15 @@ name.
 =item flock() on closed filehandle %s
 
 (W closed) The filehandle you're attempting to flock() got itself closed
-some time before now.  Check your logic flow.  flock() operates on
+some time before now.  Check your control flow.  flock() operates on
 filehandles.  Are you attempting to call flock() on a dirhandle by the
 same name?
 
-=item ?+* follows nothing in regexp
+=item Quantifier follows nothing before << HERE in regex m/%s/
 
-(F) You started a regular expression with a quantifier.  Backslash it if
-you meant it literally.   See L<perlre>.
+(F) You started a regular expression with a quantifier. Backslash it if you
+meant it literally. The << HERE shows in the regular expression about where the
+problem was discovered. See L<perlre>.
 
 =item Format not terminated
 
@@ -1625,16 +1655,6 @@ C<$ENV{ENV}> or C<$ENV{BASH_ENV}> are derived from data supplied (or
 potentially supplied) by the user.  The script must set the path to a
 known value, using trustworthy data.  See L<perlsec>.
 
-=item In string, @%s now must be written as \@%s
-
-(F) It used to be that Perl would try to guess whether you wanted an
-array interpolated or a literal @.  It did this when the string was
-first used at runtime.  Now strings are parsed at compile time, and
-ambiguous instances of @ must be disambiguated, either by prepending a
-backslash to indicate a literal, or by declaring (or using) the array
-within the program before the string (lexically).  (Someday it will
-simply assume that an unbackslashed @ interpolates an array.)
-
 =item Integer overflow in %s number
 
 (W overflow) The hexadecimal, octal or binary number you have specified
@@ -1647,9 +1667,12 @@ transparently promotes all numbers to a floating point representation
 internally--subject to loss of precision errors in subsequent
 operations.
 
-=item internal disaster in regexp
+=item Internal disaster before << HERE in regex m/%s/
 
 (P) Something went badly wrong in the regular expression parser.
+The << HERE shows in the regular expression about where the problem was
+discovered.
+
 
 =item Internal inconsistency in tracking vforks
 
@@ -1660,16 +1683,18 @@ L<perlvms/"exec LIST">).  Somehow, this count has become scrambled, so
 Perl is making a guess and treating this C<exec> as a request to
 terminate the Perl script and execute the specified command.
 
-=item internal urp in regexp at /%s/
+=item Internal urp before << HERE in regex m/%s/
+
+(P) Something went badly awry in the regular expression parser. The <<<HERE
+shows in the regular expression about where the problem was discovered.
 
-(P) Something went badly awry in the regular expression parser.
 
 =item %s (...) interpreted as function
 
 (W syntax) You've run afoul of the rule that says that any list operator
 followed by parentheses turns into a function, with all the list
-operators arguments found inside the parentheses.  See L<perlop/Terms
-and List Operators (Leftward)>.
+operators arguments found inside the parentheses.  See
+L<perlop/Terms and List Operators (Leftward)>.
 
 =item Invalid %s attribute: %s
 
@@ -1689,7 +1714,14 @@ L<perlfunc/sprintf>.
 =item invalid [] range "%s" in regexp
 
 (F) The range specified in a character class had a minimum character
-greater than the maximum character.  See L<perlre>.
+greater than the maximum character.  One possibility is that you
+forgot the C<{}> from your ending C<\x{}> - C<\x> without the curly
+braces can go only up to C<ff>.  See L<perlre>.
+
+=item invalid [] range "%s" in transliteration operator
+
+(F) The range specified in the tr/// or y/// operator had a minimum
+character greater than the maximum character.  See L<perlop>.
 
 =item Invalid separator character %s in attribute list
 
@@ -1716,6 +1748,26 @@ silently ignored.
 (F) Your machine apparently doesn't implement ioctl(), which is pretty
 strange for a machine that supports C.
 
+=item ioctl() on unopened %s
+
+(W unopened) You tried ioctl() on a filehandle that was never opened.
+Check you control flow and number of arguments.
+
+=item IO::Socket::atmark not implemented on this architecture
+
+(F) Your machine doesn't implement the sockatmark() functionality,
+neither as a system call or an ioctl call (SIOCATMARK).
+
+=item `%s' is not a code reference
+
+(W) The second (fourth, sixth, ...) argument of overload::constant needs
+to be a code reference. Either an anonymous subroutine, or a reference
+to a subroutine.
+
+=item `%s' is not an overloadable type
+
+(W) You tried to overload a constant type the overload package is unaware of.
+
 =item junk on end of regexp
 
 (P) The regular expression parser is confused.
@@ -1749,12 +1801,24 @@ effective uids or gids failed.
 to check the return value of your socket() call?  See
 L<perlfunc/listen>.
 
+=item lstat() on filehandle %s
+
+(W io) You tried to do a lstat on a filehandle.  What did you mean
+by that?  lstat() makes sense only on filenames.  (Perl did a fstat()
+instead on the filehandle.)
+
 =item Lvalue subs returning %s not implemented yet
 
 (F) Due to limitations in the current implementation, array and hash
 values cannot be returned in subroutines used in lvalue context.  See
 L<perlsub/"Lvalue subroutines">.
 
+=item Lookbehind longer than %d not implemented before << HERE %s
+
+(F) There is currently a limit on the length of string which lookbehind can
+handle. This restriction may be eased in a future release. The << HERE shows in
+the regular expression about where the problem was discovered.
+
 =item Malformed PERLLIB_PREFIX
 
 (F) An error peculiar to OS/2.  PERLLIB_PREFIX should be of the form
@@ -1770,6 +1834,15 @@ a builtin library search path, prefix2 is substituted.  The error may
 appear if components are not found, or are too long.  See
 "PERLLIB_PREFIX" in L<perlos2>.
 
+=item Malformed UTF-8 character (%s)
+
+Perl detected something that didn't comply with UTF-8 encoding rules.
+
+=item Malformed UTF-16 surrogate
+
+Perl thought it was reading UTF-16 encoded character data but while
+doing it Perl met a malformed Unicode surrogate.
+
 =item %s matches null string many times
 
 (W regexp) The pattern you've specified would be an infinite loop if the
@@ -1799,7 +1872,11 @@ ended earlier on the current line.
 
 =item Misplaced _ in number
 
-(W syntax) An underline in a decimal constant wasn't on a 3-digit boundary.
+(W syntax) An underscore (underbar) in a numeric constant either
+immediately followed an earlier underscore; or an underscore ended a
+numeric constant, or, in the case of decimal constants, an underscore
+began or ended its fractional part.  (If you try to begin a numerical
+constant with an underscore, it won't even be recognized as a number.)
 
 =item Missing %sbrace%s on \N{}
 
@@ -1856,6 +1933,14 @@ catches that.  But an easy way to do the same thing is:
 
 Another way is to assign to a substr() that's off the end of the string.
 
+Yet another way is to assign to a C<foreach> loop I<VAR> when I<VAR>
+is aliased to a constant in the look I<LIST>:
+
+        $x = 1;
+        foreach my $n ($x, 2) {
+            $n *= 2; # modifies the $x, but fails on attempt to modify the 2
+        }
+
 =item Modification of non-creatable array value attempted, %s
 
 (F) You tried to make an array value spring into existence, and the
@@ -1926,14 +2011,16 @@ provided for this purpose.
 (F) You tried to do a read/write/send/recv operation with a buffer
 length that is less than 0.  This is difficult to imagine.
 
-=item nested *?+ in regexp
+=item Nested quantifiers before << HERE in regex m/%s/
 
-(F) You can't quantify a quantifier without intervening parentheses.  So
-things like ** or +* or ?* are illegal.
+(F) You can't quantify a quantifier without intervening parentheses. So
+things like ** or +* or ?* are illegal. The << HERE shows in the regular
+expression about where the problem was discovered.
 
 Note, however, that the minimal matching quantifiers, C<*?>, C<+?>, and
 C<??> appear to be nested quantifiers, but aren't.  See L<perlre>.
 
+
 =item %s never introduced
 
 (S internal) The symbol in question was declared but somehow went out of
@@ -2212,6 +2299,11 @@ L<perlport> for more on portability concerns.
 
 See also L<perlport> for writing portable code.
 
+=item Odd number of arguments for overload::constant
+
+(W) The call to overload::constant contained an odd number of arguments.
+The arguments should come in pairs.
+
 =item Odd number of elements in hash assignment
 
 (W misc) You specified an odd number of elements to initialize a hash,
@@ -2224,6 +2316,17 @@ pointing outside the buffer.  This is difficult to imagine.  The sole
 exception to this is that C<sysread()>ing past the buffer will extend
 the buffer and zero pad the new area.
 
+=item -%s on unopened filehandle %s
+
+(W unopened) You tried to invoke a file test operator on a filehandle
+that isn't open.  Check your control flow.  See also L<perlfunc/-X>.
+
+=item %s() on unopened %s
+
+(W unopened) An I/O operation was attempted on a filehandle that was
+never initialized.  You need to do an open(), a sysopen(), or a socket()
+call, or call a constructor from the FileHandle package.
+
 =item oops: oopsAV
 
 (S internal) An internal warning that the grammar is screwed up.
@@ -2275,7 +2378,8 @@ The request was judged to be small, so the possibility to trap it
 depends on the way perl was compiled.  By default it is not trappable.
 However, if compiled for this, Perl may use the contents of C<$^M> as an
 emergency pool after die()ing with this message.  In this case the error
-is trappable I<once>.
+is trappable I<once>, and the error message will include the line and file
+where the failed request happened.
 
 =item Out of memory during ridiculously large request
 
@@ -2333,23 +2437,19 @@ reference.
 (P) We popped the context stack to an eval context, and then discovered
 it wasn't an eval context.
 
-=item panic: do_match
+=item panic: pp_match
 
 (P) The internal pp_match() routine was called with invalid operational
 data.
 
-=item panic: do_split
-
-(P) Something terrible went wrong in setting up for the split.
-
 =item panic: do_subst
 
 (P) The internal pp_subst() routine was called with invalid operational
 data.
 
-=item panic: do_trans
+=item panic: do_trans_%s
 
-(P) The internal do_trans() routine was called with invalid operational
+(P) The internal do_trans routines were called with invalid operational
 data.
 
 =item panic: frexp
@@ -2441,6 +2541,10 @@ and freeing temporaries and lexicals from.
 
 (P) The foreach iterator got called in a non-loop context frame.
 
+=item panic: pp_split
+
+(P) Something terrible went wrong in setting up for the split.
+
 =item panic: realloc
 
 (P) Something requested a negative number of bytes of realloc.
@@ -2472,6 +2576,11 @@ was string.
 
 (P) The lexer got into a bad state while processing a case modifier.
 
+=item panic: utf16_to_utf8: odd bytelen
+
+(P) Something tried to call utf16_to_utf8 with an odd (as opposed
+to even) byte length.
+
 =item Parentheses missing around "%s" list
 
 (W parenthesis) You said something like
@@ -2508,13 +2617,39 @@ C<sh>-shell in.  See "PERL_SH_DIR" in L<perlos2>.
 
 Exactly what were the failed locale settings varies.  In the above the
 settings were that the LC_ALL was "En_US" and the LANG had no value.
-This error means that Perl detected that you and/or your system
-administrator have set up the so-called variable system but Perl could
-not use those settings.  This was not dead serious, fortunately: there
-is a "default locale" called "C" that Perl can and will use, the script
-will be run.  Before you really fix the problem, however, you will get
-the same error message each time you run Perl.  How to really fix the
-problem can be found in L<perllocale> section B<LOCALE PROBLEMS>.
+This error means that Perl detected that you and/or your operating
+system supplier and/or system administrator have set up the so-called
+locale system but Perl could not use those settings.  This was not
+dead serious, fortunately: there is a "default locale" called "C" that
+Perl can and will use, the script will be run.  Before you really fix
+the problem, however, you will get the same error message each time
+you run Perl.  How to really fix the problem can be found in
+L<perllocale> section B<LOCALE PROBLEMS>.
+
+=item perlio: argument list not closed for layer "%s"
+
+(S) When pushing a layer with arguments onto the Perl I/O system you forgot
+the ) that closes the argument list.  (Layers take care of transforming
+data between external and internal representations.)  Perl stopped parsing
+the layer list at this point and did not attempt to push this layer.
+If your program didn't explicitly request the failing operation, it may be
+the result of the value of the environment variable PERLIO.
+
+=item perlio: invalid separator character %s in attribute list
+
+(S) When pushing layers onto the Perl I/O system, something other than a
+colon or whitespace was seen between the elements of an layer list.
+If the previous attribute had a parenthesised parameter list, perhaps that
+list was terminated too soon.
+
+=item perlio: unknown layer "%s"
+
+(S) An attempt was made to push an unknown layer onto the Perl I/O
+system.  (Layers take care of transforming data between external and
+internal representations.)  Note that some layers, such as C<mmap>,
+are not supported in all environments.  If your program didn't
+explicitly request the failing operation, it may be the result of the
+value of the environment variable PERLIO.
 
 =item Permission denied
 
@@ -2526,6 +2661,35 @@ problem can be found in L<perllocale> section B<LOCALE PROBLEMS>.
 process which isn't a subprocess of the current process.  While this is
 fine from VMS' perspective, it's probably not what you intended.
 
+=item POSIX syntax [%s] belongs inside character classes
+
+(W unsafe) The character class constructs [: :], [= =], and [. .]  go
+I<inside> character classes, the [] are part of the construct, for
+example: /[012[:alpha:]345]/.  Note that [= =] and [. .] are not
+currently implemented; they are simply placeholders for future
+extensions and will cause fatal errors.
+
+=item POSIX  syntax [. .] is reserved for future extensions
+
+(F regexp) Within regular expression character classes ([]) the syntax
+beginning with "[." and ending with ".]" is reserved for future
+extensions.  If you need to represent those character sequences inside
+a regular expression character class, just quote the square brackets
+with the backslash: "\[." and ".\]".
+
+=item POSIX syntax [= =] is reserved for future extensions
+
+(F) Within regular expression character classes ([]) the syntax
+beginning with "[=" and ending with "=]" is reserved for future
+extensions.  If you need to represent those character sequences inside
+a regular expression character class, just quote the square brackets
+with the backslash: "\[=" and "=\]".
+
+=item POSIX class [:%s:] unknown
+
+(F) The class in the character class [: :] syntax is unknown.  See
+L<perlre>.
+
 =item POSIX getpgrp can't take an argument
 
 (F) Your system has POSIX getpgrp(), which takes no argument, unlike
@@ -2628,12 +2792,12 @@ See Server error.
 =item printf() on closed filehandle %s
 
 (W closed) The filehandle you're writing to got itself closed sometime
-before now.  Check your logic flow.
+before now.  Check your control flow.
 
 =item print() on closed filehandle %s
 
 (W closed) The filehandle you're printing on got itself closed sometime
-before now.  Check your logic flow.
+before now.  Check your control flow.
 
 =item Process terminated by SIG%s
 
@@ -2648,6 +2812,20 @@ in L<perlos2>.
 (S unsafe) The subroutine being declared or defined had previously been
 declared or defined with a different function prototype.
 
+=item Quantifier in {,} bigger than %d before << HERE in regex m/%s/
+
+(F) There is currently a limit to the size of the min and max values of the
+{min,max} construct. The << HERE shows in the regular expression about where
+the problem was discovered. See L<perlre>.
+
+=item Quantifier unexpected on zero-length expression before << HERE %s
+
+(W regexp) You applied a regular expression quantifier in a place where
+it makes no sense, such as on a zero-width assertion.  Try putting the
+quantifier inside the assertion instead.  For example, the way to match
+"abc" provided that it is followed by three repetitions of "xyz" is
+C</abc(?=(?:xyz){3})/>, not C</abc(?=xyz){3}/>.
+
 =item Range iterator outside integer range
 
 (F) One (or both) of the numeric arguments to the range operator ".."
@@ -2658,7 +2836,7 @@ by prepending "0" to your numbers.
 =item readline() on closed filehandle %s
 
 (W closed) The filehandle you're reading from got itself closed sometime
-before now.  Check your logic flow.
+before now.  Check your control flow.
 
 =item Reallocation too large: %lx
 
@@ -2708,17 +2886,22 @@ Doing so has no effect.
 (W internal) The internal sv_replace() function was handed a new SV with
 a reference count of other than 1.
 
+=item Reference to nonexistent group before << HERE in regex m/%s/
+
+(F) You used something like C<\7> in your regular expression, but there are
+not at least seven sets of capturing parentheses in the expression. If you
+wanted to have the character with value 7 inserted into the regular expression,
+prepend a zero to make the number at least two digits: C<\07>
+
+The << HERE shows in the regular expression about where the problem was
+discovered.
+
 =item regexp memory corruption
 
 (P) The regular expression engine got confused by what the regular
 expression compiler gave it.
 
-=item regexp *+ operand could be empty
-
-(F) The part of the regexp subject to either the * or + quantifier could
-match an empty string.
-
-=item regexp out of space
+=item Regexp out of space
 
 (P) A "can't happen" error, because safemalloc() should have caught it
 earlier.
@@ -2776,6 +2959,13 @@ as a list, you need to look into how references work, because Perl will
 not magically convert between scalars and lists for you.  See
 L<perlref>.
 
+=item Scalars leaked: %d
+
+(P) Something went wrong in Perl's internal bookkeeping of scalars:
+not all scalar variables were deallocated by the time Perl exited.
+What this usually indicates is a memory leak, which is of course bad,
+especially if the Perl program is intended to be long-running.
+
 =item Script is not setuid/setgid in suidperl
 
 (F) Oddly, the suidperl program was invoked on a script without a setuid
@@ -2787,7 +2977,7 @@ or setgid bit set.  This doesn't make much sense.
 construct.  Remember that bracketing delimiters count nesting level.
 Missing the leading C<$> from a variable C<$m> may cause this error.
 
-=item %sseek() on unopened file
+=item %sseek() on unopened filehandle
 
 (W unopened) You tried to use the seek() or sysseek() function on a
 filehandle that was either never opened or has since been closed.
@@ -2796,6 +2986,11 @@ filehandle that was either never opened or has since been closed.
 
 (F) This machine doesn't implement the select() system call.
 
+=item Self-ties of arrays and hashes are not supported
+
+(F) Self-ties are of arrays and hashes are not supported in
+the current implementation.
+
 =item Semicolon seems to be missing
 
 (W semicolon) A nearby syntax error was probably caused by a missing
@@ -2813,24 +3008,33 @@ scalar that had previously been marked as free.
 =item send() on closed socket %s
 
 (W closed) The socket you're sending to got itself closed sometime
-before now.  Check your logic flow.
+before now.  Check your control flow.
 
-=item Sequence (? incomplete
+=item Sequence (? incomplete before << HERE mark in regex m/%s/
 
-(F) A regular expression ended with an incomplete extension (?.  See
+(F) A regular expression ended with an incomplete extension (?. The <<<HERE
+shows in the regular expression about where the problem was discovered. See
 L<perlre>.
 
-=item Sequence (?%s...) not implemented
+=item Sequence (?{...}) not terminated or not {}-balanced in %s
+
+(F) If the contents of a (?{...}) clause contains braces, they must balance
+for Perl to properly detect the end of the clause. See L<perlre>.
+
+=item Sequence (?%s...) not implemented before << HERE mark in %s
 
-(F) A proposed regular expression extension has the character reserved
-but has not yet been written.  See L<perlre>.
+(F) A proposed regular expression extension has the character reserved but
+has not yet been written. The << HERE shows in the regular expression about
+where the problem was discovered. See L<perlre>.
 
-=item Sequence (?%s...) not recognized
+=item Sequence (?%s...) not recognized before << HERE mark in %s
 
 (F) You used a regular expression extension that doesn't make sense.
+The << HERE shows in the regular expression about
+where the problem was discovered.
 See L<perlre>.
 
-=item Sequence (?#... not terminated
+=item Sequence (?#... not terminated in regex m/%s/
 
 (F) A regular expression comment must be terminated by a closing
 parenthesis.  Embedded parentheses aren't allowed.  See L<perlre>.
@@ -2962,19 +3166,10 @@ unless there was a failure.  You probably wanted to use system()
 instead, which does return.  To suppress this warning, put the exec() in
 a block by itself.
 
-=item Stat on unopened file <%s>
+=item stat() on unopened filehandle %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.
-
-=item Strange *+?{} on zero-length expression
-
-(W regexp) You applied a regular expression quantifier in a place where
-it makes no sense, such as on a zero-width assertion.  Try putting the
-quantifier inside the assertion instead.  For example, the way to match
-"abc" provided that it is followed by three repetitions of "xyz" is
-C</abc(?=(?:xyz){3})/>, not C</abc(?=xyz){3}/>.
+(W unopened) You tried to use the stat() function on a filehandle that
+was either never opened or has since been closed.
 
 =item Stub found while resolving method `%s' overloading %s
 
@@ -3023,6 +3218,24 @@ assignment or as a subroutine argument for example).
 (F) Your Perl was compiled with B<-D>SETUID_SCRIPTS_ARE_SECURE_NOW, but
 a version of the setuid emulator somehow got run anyway.
 
+=item Switch (?(condition)... contains too many branches before << HE%s
+
+(F) A (?(condition)if-clause|else-clause) construct can have at most two
+branches (the if-clause and the else-clause). If you want one or both to
+contain alternation, such as using C<this|that|other>, enclose it in
+clustering parentheses:
+
+    (?(condition)(?:this|that|other)|else-clause)
+
+The << HERE shows in the regular expression about where the problem was
+discovered. See L<perlre>.
+
+=item Switch condition not recognized before << HERE in regex m/%s/
+
+(F) If the argument to the (?(...)if-clause|else-clause) construct is a
+number, it can be only a number. The << HERE shows in the regular expression
+about where the problem was discovered. See L<perlre>.
+
 =item switching effective %s is not implemented
 
 (F) While under the C<use filetest> pragma, we cannot switch the real
@@ -3070,23 +3283,18 @@ unconfigured.  Consult your system support.
 =item syswrite() on closed filehandle %s
 
 (W closed) The filehandle you're writing to got itself closed sometime
-before now.  Check your logic flow.
+before now.  Check your control flow.
 
 =item Target of goto is too deeply nested
 
 (F) You tried to use C<goto> to reach a label that was too deeply nested
 for Perl to reach.  Perl is doing you a favor by refusing.
 
-=item tell() on unopened file
+=item tell() on unopened filehandle
 
 (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 <%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>.
-
 =item That use of $[ is unsupported
 
 (F) Assignment to C<$[> is now strictly circumscribed, and interpreted
@@ -3115,7 +3323,7 @@ will deny it.
 The function indicated isn't implemented on this architecture, according
 to the probings of Configure.
 
-=item The stat preceding C<-l _> wasn't an lstat
+=item The stat preceding %s wasn't an lstat
 
 (F) It makes no sense to test the current stat buffer for symbolic
 linkhood if the last stat that wrote to the stat buffer already went
@@ -3297,11 +3505,23 @@ Check the #! line, or manually feed your script into Perl yourself.
 (F) The unexec() routine failed for some reason.  See your local FSF
 representative, who probably put it there in the first place.
 
+
 =item Unknown BYTEORDER
 
 (F) There are no byte-swapping functions for a machine with this byte
 order.
 
+=item Unknown switch condition (?(%.2s before << HERE in regex m/%s/
+
+(F) The condition of a (?(condition)if-clause|else-clause) construct is not
+known. The condition may be lookaround (the condition is true if the
+lookaround is true), a (?{...}) construct (the condition is true if the
+code evaluates to a true value), or a number (the condition is true if the
+set of capturing parentheses named by the number is defined).
+
+The << HERE shows in the regular expression about where the problem was
+discovered.  See L<perlre>.
+
 =item Unknown open() mode '%s'
 
 (F) The second argument of 3-argument open() is not among the list
@@ -3315,13 +3535,14 @@ iterating over it, and someone else stuck a message in the stream of
 data Perl expected.  Someone's very confused, or perhaps trying to
 subvert Perl's population of %ENV for nefarious purposes.
 
-=item unmatched [] in regexp
+=item unmatched [ before << HERE mark in regex m/%s/
 
-(F) The brackets around a character class must match.  If you wish to
+(F) The brackets around a character class must match. If you wish to
 include a closing bracket in a character class, backslash it or put it
-first.  See L<perlre>.
+first. See L<perlre>. The << HERE shows in the regular expression about
+where the escape was discovered.
 
-=item unmatched () in regexp
+=item unmatched ( in regexp before << HERE mark in regex m/%s/
 
 (F) Unbackslashed parentheses must always be balanced in regular
 expressions.  If you're a vi user, the % key is valuable for finding the
@@ -3353,12 +3574,14 @@ script, a binary program, or a directory as a Perl program.
 recognized by Perl inside character classes.  The character was
 understood literally.
 
-=item /%s/: Unrecognized escape \\%c passed through
+=item Unrecognized escape \\%c passed through before << HERE in m/%s/
 
 (W regexp) You used a backslash-character combination which is not
-recognized by Perl.  This combination appears in an interpolated
-variable or a C<'>-delimited regular expression.  The character was
-understood literally.
+recognized by Perl. This combination appears in an interpolated variable or
+a C<'>-delimited regular expression. The character was understood
+literally. The << HERE shows in the regular expression about where the escape
+was discovered.
+
 
 =item Unrecognized escape \\%c passed through
 
@@ -3381,8 +3604,7 @@ bad switch on your behalf.)
 
 (W newline) A file operation was attempted on a filename, and that
 operation failed, PROBABLY because the filename contained a newline,
-PROBABLY because you forgot to chop() or chomp() it off.  See
-L<perlfunc/chomp>.
+PROBABLY because you forgot to chomp() it off.  See L<perlfunc/chomp>.
 
 =item Unsupported directory function "%s" called
 
@@ -3401,6 +3623,11 @@ Note that under some systems, like OS/2, there may be different flavors
 of Perl executables, some of which may support fork, some not. Try
 changing the name you call Perl by to C<perl_>, C<perl__>, and so on.
 
+=item Unsupported script encoding
+
+(F) Your program file begins with a Unicode Byte Order Mark (BOM) which
+declares it to be in a Unicode encoding that Perl cannot yet read.
+
 =item Unsupported socket function "%s" called
 
 (F) Your machine doesn't support the Berkeley socket mechanism, or at
@@ -3420,6 +3647,12 @@ an attribute list, but the matching closing (right) parenthesis
 character was not found.  You may need to add (or remove) a backslash
 character to get your parentheses to balance.  See L<attributes>.
 
+=item Unterminated compressed integer
+
+(F) An argument to unpack("w",...) was incompatible with the BER
+compressed integer format and could not be converted to an integer.
+See L<perlfunc/pack>.
+
 =item Unterminated <> operator
 
 (F) The lexer saw a left angle bracket in a place where it was expecting
@@ -3464,10 +3697,27 @@ a scalar context, the comma is treated like C's comma operator, which
 throws away the left argument, which is not what you want.  See
 L<perlref> for more on this.
 
+This warning will not be issued for numerical constants equal to 0 or 1
+since they are often used in statements like
+
+    1 while sub_with_side_effects() ;
+
+String constants that would normally evaluate to 0 or 1 are warned
+about.
+
 =item Useless use of "re" pragma
 
 (W) You did C<use re;> without any arguments.   That isn't very useful.
 
+=item Useless use of %s with no values
+
+(W syntax) You used the push() or unshift() function with no arguments
+apart from the array, like C<push(@x)> or C<unshift(@foo)>. That won't
+usually have any effect on the array, so is completely useless. It's
+possible in principle that push(@tied_array) could have some effect
+if the array is tied to a class which implements a PUSH method. If so,
+you can write it as C<push(@tied_array,())> to avoid this warning.
+
 =item "use" not allowed in expression
 
 (F) The "use" keyword is recognized and executed at compile time, and
@@ -3531,6 +3781,15 @@ old way has bad side effects.
 (D deprecated) This was an ill-advised attempt to emulate a poorly
 defined B<awk> feature.  Use an explicit printf() or sprintf() instead.
 
+=item Use of reference "%s" in array index
+
+(W) You tried to use a reference as an array index; this probably
+isn't what you mean, because references tend to be huge numbers which
+take you out of memory, and so usually indicates programmer error.
+
+If you really do mean it, explicitly numify your reference, like so:
+C<$array[0+$ref]>
+
 =item Use of reserved word "%s" is deprecated
 
 (D deprecated) The indicated bareword is a reserved word.  Future
@@ -3634,6 +3893,12 @@ anonymous, using the C<sub {}> syntax.  When inner anonymous subs that
 reference variables in outer subroutines are called or referenced, they
 are automatically rebound to the current values of such variables.
 
+=item Variable length lookbehind not implemented before << HERE in %s
+
+(F) Lookbehind is allowed only for subexpressions whose length is fixed and
+known at compile time. The << HERE shows in the regular expression about where
+the problem was discovered.
+
 =item Version number must be a constant number
 
 (P) The attempt to translate a C<use Module n.n LIST> statement into
@@ -3670,10 +3935,14 @@ but in actual fact, you got
 
 So put in parentheses to say what you really mean.
 
+=item Wide character in %s
+
+(W utf8) Perl met a wide character (>255) when it wasn't expecting one.
+
 =item write() on closed filehandle %s
 
 (W closed) The filehandle you're writing to got itself closed sometime
-before now.  Check your logic flow.
+before now.  Check your control flow.
 
 =item X outside of string