This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldiag: Describe \g syntax error
[perl5.git] / pod / perldiag.pod
index 2be0f79..13ffbee 100644 (file)
@@ -20,7 +20,7 @@ The majority of messages from the first three classifications above
 
 If a message can be controlled by the C<warnings> pragma, its warning
 category is included with the classification letter in the description
-below.
+below.  E.g. C<(W closed)> means a warning in the C<closed> category.
 
 Optional warnings are enabled by using the C<warnings> pragma or the B<-w>
 and B<-W> switches.  Warnings may be captured by setting C<$SIG{__WARN__}>
@@ -536,13 +536,15 @@ check the return value of your socket() call?  See L<perlfunc/bind>.
 (W unopened) You tried binmode() on a filehandle that was never opened.
 Check your control flow and number of arguments.
 
-=item "\b{" is deprecated; use "\b\{" instead
+=item "\b{" is deprecated; use "\b\{" or "\b[{]" instead in regex; marked by <-- HERE in m/%s/
 
-=item "\B{" is deprecated; use "\B\{" instead
+=item "\B{" is deprecated; use "\B\{" or "\B[{]" instead in regex; marked by <-- HERE in m/%s/
 
-(W deprecated, regexp) Use of an unescaped "{" immediately following a
+(W deprecated) Use of an unescaped "{" immediately following a
 C<\b> or C<\B> is now deprecated so as to reserve its use for Perl
-itself in a future release.
+itself in a future release.  You can either precede the brace with a
+backslash, or enclose it in square brackets; the latter is the way to go
+if the pattern delimiters are C<{}>.
 
 =item Bit vector size > 32 non-portable
 
@@ -671,7 +673,7 @@ Something like this will reproduce the error:
 
 =item Can't chdir to %s
 
-(F) You called C<perl -x/foo/bar>, but C</foo/bar> is not a directory
+(F) You called C<perl -x/foo/bar>, but F</foo/bar> is not a directory
 that you can chdir to, possibly because it doesn't exist.
 
 =item Can't check filesystem of script "%s" for nosuid
@@ -787,7 +789,7 @@ is no builtin with the name C<word>.
 (F) You used C<\p{}> or C<\P{}> but the character property by that name
 could not be found.  Maybe you misspelled the name of the property?
 See L<perluniprops/Properties accessible through \p{} and \P{}>
-for a complete list of available properties.
+for a complete list of available official properties.
 
 =item Can't find label %s
 
@@ -996,6 +998,15 @@ e.g. open(FH, ">:nosuchlayer", "somefile").
 (F) List assignment to %ENV is not supported on some systems, notably
 VMS.
 
+=item Can't make loaded symbols global on this platform while loading %s
+
+(W) A module passed the flag 0x01 to DynaLoader::dl_load_file() to request
+that symbols from the stated file are made available globally within the
+process, but that functionality is not available on this platform.  Whilst
+the module likely will still work, this may prevent the perl interpreter
+from loading other XS-based extensions which need to link directly to
+functions defined in the C or XS code in the stated file.
+
 =item Can't modify %s in %s
 
 (F) You aren't allowed to assign to the item indicated, or otherwise try
@@ -1300,11 +1311,12 @@ Perhaps you need to copy the value to a temporary, and repeat that.
 =item Character following "\c" must be ASCII
 
 (F)(W 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 5.18.  In the
+It is planned to make this fatal in all instances in Perl v5.20.  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.
+Note that non-alphabetic ASCII characters are discouraged here as well,
+and using non-printable ones will be deprecated starting in v5.18.
 
 =item Character in 'C' format wrapped in pack
 
@@ -1389,7 +1401,7 @@ uses the character values modulus 256 instead, as if you had provided:
 (D deprecated, syntax) The C<\cI<X>> construct is intended to be a way
 to specify non-printable characters.  You used it with a "{" which
 evaluates to ";", which is printable.  It is planned to remove the
-ability to specify a semi-colon this way in Perl 5.18.  Just use a
+ability to specify a semi-colon this way in Perl 5.20.  Just use a
 semi-colon or a backslash-semi-colon without the "\c".
 
 =item "\c%c" is more clearly written simply as "%s"
@@ -1585,6 +1597,13 @@ valid magic number.
 
 (P) The malloc package that comes with Perl had an internal failure.
 
+=item Corrupted regexp opcode %d > %d
+
+(F)
+This is either an error in Perl, or, if you're using one, your
+L<custom regular expression engine|perlreapi>.  If not the latter,
+report the problem through the L<perlbug> utility.
+
 =item Count after length/code in unpack
 
 (F) You had an unpack template indicating a counted-length string, but
@@ -1720,7 +1739,7 @@ See Server error.
 =item %s does not define %s::VERSION--version check failed
 
 (F) You said something like "use Module 42" but the Module did not
-define a C<$VERSION.>
+define a C<$VERSION>.
 
 =item '/' does not take a repeat count
 
@@ -1772,7 +1791,7 @@ it's ugly.  Your code will be interpreted as an attempt to call a method
 named "elseif" for the class returned by the following block.  This is
 unlikely to be what you want.
 
-=item Empty %s
+=item Empty \%c{} in regex; marked by <-- HERE in m/%s/
 
 (F) C<\p> and C<\P> are used to introduce a named Unicode property, as
 described in L<perlunicode> and L<perlre>.  You used C<\p> or C<\P> in
@@ -1797,6 +1816,23 @@ single form when it must operate on them directly.  Either you've passed
 an invalid file specification to Perl, or you've found a case the
 conversion routines don't handle.  Drat.
 
+=item Escape literal pattern white space under /x
+
+(D deprecated) You compiled a regular expression pattern with C</x> to
+ignore white space, and you used, as a literal, one of the characters
+that Perl plans to eventually treat as white space.  The character must
+be escaped somehow, or it will work differently on a future Perl that
+does treat it as white space.  The easiest way is to insert a backslash
+immediately before it, or to enclose it with square brackets.  This
+change is to bring Perl into conformance with Unicode recommendations.
+Here are the five characters that generate this warning:
+U+0085 NEXT LINE,
+U+200E LEFT-TO-RIGHT MARK,
+U+200F RIGHT-TO-LEFT MARK,
+U+2028 LINE SEPARATOR,
+and
+U+2029 PARAGRAPH SEPARATOR.
+
 =item Eval-group in insecure regular expression
 
 (F) Perl detected tainted data when trying to compile a regular
@@ -1870,6 +1906,17 @@ as a goto, or a loop control statement.
 (W exiting) You are exiting a substitution by unconventional means, such
 as a return, a goto, or a loop control statement.
 
+=item Expecting close bracket in regex; marked by <-- HERE in m/%s/
+
+(F)
+You wrote something like
+
+ (?13
+
+to denote a capturing group of the form
+L<C<(?I<PARNO>)>|perlre/(?PARNO) (?-PARNO) (?+PARNO) (?R) (?0)>,
+but omitted the C<")">.
+
 =item Experimental "%s" subs not enabled
 
 (F) To use lexical subs, you must first enable them:
@@ -2028,6 +2075,13 @@ C<getpwnam> operator returned an invalid UIC.
 forget to check the return value of your socket() call?  See
 L<perlfunc/getsockopt>.
 
+=item given is experimental
+
+(S experimental::smartmatch) C<given> depends on both a lexical C<$_> and
+smartmatch, both of which are experimental, so its behavior may change or
+even be removed in any future release of perl.
+See the explanation under L<perlsyn/Experimental Details on given and when>.
+
 =item Global symbol "%s" requires explicit package name
 
 (F) You've said "use strict" or "use strict vars", which indicates 
@@ -2214,6 +2268,17 @@ two from 1 to 32 (or 64, if your platform supports that).
 (W digit) You may have tried to use an 8 or 9 in an octal number.
 Interpretation of the octal number stopped before the 8 or 9.
 
+=item Illegal pattern in regex; marked by <-- HERE in m/%s/
+
+(F)
+You wrote something like
+
+ (?+foo)
+
+The C<"+"> is valid only when followed by digits, indicating a
+capturing group.  See
+L<C<(?I<PARNO>)>|perlre/(?PARNO) (?-PARNO) (?+PARNO) (?R) (?0)>.
+
 =item Illegal switch in PERL5OPT: -%c
 
 (X) The PERL5OPT environment variable may only be used to set the
@@ -2243,6 +2308,34 @@ would otherwise result in the same message being repeated.
 Failure of user callbacks dispatched using the C<G_KEEPERR> flag could
 also result in this warning.  See L<perlcall/G_KEEPERR>.
 
+=item In '(*VERB...)', splitting the initial '(*' is deprecated in regex; marked by <-- HERE in m/%s/
+
+(D regexp, deprecated)
+The two-character sequence C<"(*"> in this context in a regular
+expression pattern should be an indivisible token, with nothing
+intervening between the C<"("> and the C<"*">, but you separated them.
+Due to an accident of implementation, this prohibition was not enforced,
+but we do plan to forbid it in a future Perl version.  This message
+serves as giving you fair warning of this pending change.
+
+=item In '(?...)', splitting the initial '(?' is deprecated in regex; marked by <-- HERE in m/%s/
+
+(D regexp, deprecated)
+The two-character sequence C<"(?"> in this context in a regular
+expression pattern should be an indivisible token, with nothing
+intervening between the C<"("> and the C<"?">, but you separated them.
+Due to an accident of implementation, this prohibition was not enforced,
+but we do plan to forbid it in a future Perl version.  This message
+serves as giving you fair warning of this pending change.
+
+=item Incomplete expression within '(?[ ])' in regex; marked by <-- HERE in m/%s/
+
+(F)
+There was a syntax error within the C<(?[ ])>.  This can happen if the
+expression inside the construct was completely empty, or if there are
+too many or few operands for the number of operators.  Perl is not smart
+enough to give you a more precise indication as to what is wrong.
+
 =item Inconsistent hierarchy during C3 merge of class '%s': merging failed on 
 parent '%s'
 
@@ -2380,6 +2473,18 @@ by Perl or by a user-supplied handler.  See L<attributes>.
 (F) The indicated attributes for a subroutine or variable were not
 recognized by Perl or by a user-supplied handler.  See L<attributes>.
 
+=item Invalid [] range "%*.*s" in regex; marked by <-- HERE in m/%s/
+
+(F)
+You wrote something like
+
+ [z-a]
+
+in a regular expression pattern.  Ranges must be specified with the
+lowest code point first.  Instead write
+
+ [a-z]
+
 =item Invalid character in \N{...}; marked by <-- HERE in \N{%s}
 
 (F) Only certain characters are valid for character names.  The
@@ -2439,7 +2544,7 @@ character (U+FFFD).
 
 (S debugging) Perl was called with invalid debugger flags.  Call perl
 with the B<-D> option with no flags to see the list of acceptable values.
-See also L<perlrun/B<-D>I<letters>>.
+See also L<perlrun/-Dletters>.
 
 =item Invalid [] range "%s" in regex; marked by <-- HERE in m/%s/
 
@@ -2525,17 +2630,6 @@ with 'useperlio'.
 (F) Your machine doesn't implement the sockatmark() functionality,
 neither as a system call nor an ioctl call (SIOCATMARK).
 
-=item It is deprecated to pass malformed UTF-8 to character classification macros, for "%s"
-
-(D deprecated, utf8) This message indicates a bug either in the Perl
-core or in XS code.  Such code was trying to find out if a character,
-allegedly stored internally encoded as UTF-8, was of a given type, such
-as being punctuation or a digit.  But the character was not encoded in
-legal UTF-8.  The C<%s> is replaced by a string that can be used by
-knowledgeable people to determine what the type being checked against
-was.  If C<utf8> warnings are enabled, a further message is raised,
-giving details of the malformation.
-
 =item $* is no longer supported
 
 (D deprecated, syntax) The special variable C<$*>, deprecated in older
@@ -3036,6 +3130,25 @@ C<\N> is separated by spaces from the C<{>, in which case, remove the spaces.
     /\N {SPACE}/x;     # Wrong!
     /\N{SPACE}/x;      # ok
 
+=item Need exactly 3 octal digits in regex; marked by <-- HERE in m/%s/
+
+(F) Within S<C<(?[   ])>>, all constants interpreted as octal need to be
+exactly 3 digits long.  This helps catch some ambiguities.  If your
+constant is too short, add leading zeros, like
+
+ (?[ [ \078 ] ])     # Syntax error!
+ (?[ [ \0078 ] ])    # Works
+ (?[ [ \007 8 ] ])   # Clearer
+
+The maximum number this construct can express is C<\777>.  If you
+need a larger one, you need to use L<\o{}|perlrebackslash/Octal escapes>
+instead.  If you meant two separate things, you need to separate them
+
+ (?[ [ \7776 ] ])        # Syntax error!
+ (?[ [ \o{7776} ] ])     # One meaning
+ (?[ [ \777 6 ] ])       # Another meaning
+ (?[ [ \777 \006 ] ])    # Still another
+
 =item Negative '/' count in unpack
 
 (F) The length count obtained from a length/code unpack operation was
@@ -3300,18 +3413,43 @@ to UTC.  If it's not, define the logical name
 F<SYS$TIMEZONE_DIFFERENTIAL> to translate to the number of seconds which
 need to be added to UTC to get local time.
 
+=item Non-hex character in regex; marked by <-- HERE in m/%s/
+
+(F)
+In a regular expression, there was a non-hexadecimal character where
+a hex one was expected, like
+
+ (?[ [ \xDG ] ])
+ (?[ [ \x{DEKA} ] ])
+
 =item Non-octal character '%c'.  Resolved as "%s"
 
 (W digit) In parsing an octal numeric constant, a character was
 unexpectedly encountered that isn't octal.  The resulting value
 is as indicated.
 
+=item Non-octal character in regex; marked by <-- HERE in m/%s/
+
+(F)
+In a regular expression, there was a non-octal character where
+an octal one was expected, like
+
+ (?[ [ \o{1278} ] ])
+
 =item Non-string passed as bitmask
 
 (W misc) A number has been passed as a bitmask argument to select().
 Use the vec() function to construct the file descriptor bitmasks for
 select.  See L<perlfunc/select>.
 
+=item (?[...]) not valid in locale in regex; marked by <-- HERE in m/%s/
+
+(F)
+C<(?[...])> cannot be used within the scope of a C<S<use locale>> or
+with an C</l> regular expression modifier, as that would require
+deferring to run-time the calculation of what it should evaluate to, and
+it is regex compile-time only.
+
 =item Null filename used
 
 (F) You can't require the null filename, especially because on many
@@ -3404,6 +3542,12 @@ call, or call a constructor from the FileHandle package.
 (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 Strings with code points over 0xFF may not be mapped into in-memory file handles
+
+(W utf8) You tried to open a reference to a scalar for read or append
+where the scalar contained code points over 0xFF.  In-memory files
+model on-disk files and can only contain bytes.
+
 =item oops: oopsAV
 
 (S internal) An internal warning that the grammar is screwed up.
@@ -3426,6 +3570,16 @@ a symbol (glob or scalar) that already holds a filehandle.
 Although legal, this idiom might render your code confusing
 and is deprecated.
 
+=item Operand with no preceding operator in regex; marked by <-- HERE in m/%s/
+
+(F)
+You wrote something like
+
+ (?[ \p{Digit} \p{Thai} ])
+
+There are two operands, but no operator giving how you want to combine
+them.
+
 =item Operation "%s": no method found, %s
 
 (F) An attempt was made to perform an overloaded operation for which no
@@ -3795,11 +3949,34 @@ to even) byte length.
 
 (P) The lexer got into a bad state while processing a case modifier.
 
+=item Parentheses missing around "%s" list
+
+(W parenthesis) You said something like
+
+    my $foo, $bar = @_;
+
+when you meant
+
+    my ($foo, $bar) = @_;
+
+Remember that "my", "our", "local" and "state" bind tighter than comma.
+
 =item Parsing code internal error (%s)
 
 (F) Parsing code supplied by an extension violated the parser's API in
 a detectable way.
 
+=item Passing malformed UTF-8 to "%s" is deprecated
+
+(D deprecated, utf8) This message indicates a bug either in the Perl
+core or in XS code.  Such code was trying to find out if a character,
+allegedly stored internally encoded as UTF-8, was of a given type, such
+as being punctuation or a digit.  But the character was not encoded in
+legal UTF-8.  The C<%s> is replaced by a string that can be used by
+knowledgeable people to determine what the type being checked against
+was.  If C<utf8> warnings are enabled, a further message is raised,
+giving details of the malformation.
+
 =item Pattern subroutine nesting without pos change exceeded limit in regex; 
 marked by <-- HERE in m/%s/
 
@@ -3810,18 +3987,6 @@ the nesting limit is exceeded.
 The <-- HERE shows whereabouts in the regular expression the problem was
 discovered.
 
-=item Parentheses missing around "%s" list
-
-(W parenthesis) You said something like
-
-    my $foo, $bar = @_;
-
-when you meant
-
-    my ($foo, $bar) = @_;
-
-Remember that "my", "our", "local" and "state" bind tighter than comma.
-
 =item C<-p> destination: %s
 
 (F) An error occurred during the implicit output invoked by the C<-p>
@@ -3837,11 +4002,11 @@ that a method requires a package that has not been loaded.
 =item Perl folding rules are not up-to-date for 0x%X; please use the perlbug 
 utility to report; in regex; marked by <-- HERE in m/%s/
 
-(W regexp, deprecated) You used a regular expression with
+(D regexp, deprecated) You used a regular expression with
 case-insensitive matching, and there is a bug in Perl in which the
 built-in regular expression folding rules are not accurate.  This may
 lead to incorrect results.  Please report this as a bug using the
-"perlbug" utility.  (This message is marked deprecated, so that it by
+L<perlbug> utility.  (This message is marked deprecated, so that it by
 default will be turned-on.)
 
 =item Perl_my_%s() not available
@@ -3882,6 +4047,7 @@ on the version of Perl you are using because it is too new.
 Maybe the code needs to be updated, or maybe it is simply
 wrong and the version check should just be removed.
 
+
 =item perl: warning: Setting locale failed.
 
 (S) The whole warning message will look something like:
@@ -3904,12 +4070,26 @@ 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 perl: warning: Non hex character in '$ENV{PERL_HASH_SEED}', seed only 
-partially set
+=item perl: warning: Non hex character in '$ENV{PERL_HASH_SEED}', seed only partially set
 
 (W) PERL_HASH_SEED should match /^\s*(?:0x)?[0-9a-fA-F]+\s*\z/ but it
-contained a non hex character. This could mean your hash randomization
-is not being set correctly.
+contained a non hex character. This could mean you are not using the hash
+seed you think you are.
+
+=item perl: warning: strange setting in '$ENV{PERL_PERTURB_KEYS}': '%s'
+
+(W) Perl was run with the environment variable PERL_PERTURB_KEYS defined
+but containing an unexpected value. The legal values of this setting
+are as follows.
+
+  Numeric | String        | Result
+  --------+---------------+-----------------------------------------
+  0       | NO            | Disables key traversal randomization
+  1       | RANDOM        | Enables full key traversal randomization
+  2       | DETERMINISTIC | Enables repeatable key traversal randomization
+
+Both numeric and string values are accepted, but note that string values are
+case sensitive. The default for this setting is "RANDOM" or 1.
 
 =item pid %x not a child
 
@@ -4086,6 +4266,17 @@ port.  One can easily disable this by appropriate sighandlers, see
 L<perlipc/"Signals">.  See also "Process terminated by SIGTERM/SIGINT"
 in L<perlos2>.
 
+=item Property '%s' is unknown in regex; marked by <-- HERE in m/%s/
+
+(F)
+The named property which you specified via C<\p> or C<\P> is not one
+known to Perl.  Perhaps you misspelled the name?  See
+L<perluniprops/Properties accessible through \p{} and \P{}>
+for a complete list of available official properties.  If it is a
+L<user-defined property|perlunicode/User-Defined Character Properties>
+it must have been defined by the time the regular expression is
+compiled.
+
 =item Prototype after '%c' for %s : %s
 
 (W illegalproto) A character follows % or @ in a prototype.  This is
@@ -4125,6 +4316,11 @@ is true for "LATIN SMALL LETTER Y WITH DIAERESIS", but since the upper
 case of that character is not in Latin1, in that locale it doesn't
 change when upper cased.
 
+=item Quantifier {n,m} with n > m can't match in regex
+
+(W regexp) Minima should be less than or equal to maxima.  If you really
+want your regexp to match something 0 times, just put {0}.
+
 =item Quantifier follows nothing in regex; marked by <-- HERE in m/%s/
 
 (F) You started a regular expression with a quantifier.  Backslash it if
@@ -4574,6 +4770,15 @@ a compilation error, but could not be found, so it was leaked instead.
 it can reliably handle and C<sleep> probably slept for less time than
 requested.
 
+=item Smartmatch is experimental
+
+(S experimental::smartmatch) This warning is emitted if you
+use the smartmatch (C<~~>) operator.  This is currently an experimental
+feature, and its details are subject to change in future releases of
+Perl.  Particularly, its current behavior is noticed for being
+unnecessarily complex and unintuitive, and is very likely to be
+overhauled.
+
 =item Smart matching a non-overloaded object breaks encapsulation
 
 (F) You should not use the C<~~> operator on an object that does not
@@ -4792,6 +4997,12 @@ or "my $var" or "our $var".
 
 (W unopened) You tried to read from a filehandle that was never opened.
 
+=item Syntax error in (?[...]) in regex m/%s/
+
+(F)
+Perl could not figure out what you meant inside this construct; this
+notifies you that it is giving up trying.
+
 =item System V %s is not implemented on this machine
 
 (F) You tried to do something with a function beginning with "sem",
@@ -4859,6 +5070,29 @@ change or be removed in a future Perl version:
     use feature "lexical_subs";
     my sub foo { ... }
 
+=item The regex_sets feature is experimental
+
+(S experimental::regex_sets) This warning is emitted if you
+use the syntax S<C<(?[   ])>> in a regular expression.
+The details of this feature are subject to change.
+if you want to use it, but know that in doing so you
+are taking the risk of using an experimental feature which may
+change in a future Perl version, you can do this to silence the
+warning:
+
+    no warnings "experimental::regex_sets";
+
+=item The %s feature is experimental
+
+(S experimental) This warning is emitted if you enable an experimental
+feature via C<use feature>.  Simply suppress the warning if you want
+to use the feature, but know that in doing so you are taking the risk
+of using an experimental feature which may change or be removed in a
+future Perl version:
+
+    no warnings "experimental::lexical_subs";
+    use feature "lexical_subs";
+
 =item The %s function is unimplemented
 
 (F) The function indicated isn't implemented on this architecture, according
@@ -4887,6 +5121,14 @@ F<PERL_ENV_TABLES> (see L<perlvms>) so that the environ array isn't the
 target of the change to
 %ENV which produced the warning.
 
+=item This Perl has not been built with support for randomized hash key traversal but something called Perl_hv_rand_set().
+
+(F) Something has attempted to use an internal API call which
+depends on Perl being compiled with the default support for randomized hash
+key traversal, but this Perl has been compiled without it. You should
+report this warning to the relevant upstream party, or recompile perl
+with default options.
+
 =item thread failed to start: %s
 
 (W threads)(S) The entry point function of threads->create() failed for some reason.
@@ -5093,23 +5335,58 @@ C<undef *foo>.
 (A) You've accidentally run your script through B<csh> instead of Perl.
 Check the #! line, or manually feed your script into Perl yourself.
 
-=item Unescaped left brace in regex is deprecated, passed through in regex; 
-marked by <-- HERE in m/%s/
-
-(D deprecated, regexp) You used a literal C<"{"> character in a regular 
-expression pattern. You should change to use C<"\{"> instead, because a future 
-version of Perl (tentatively v5.20) will consider this to be a syntax error.  If
-the pattern delimiters are also braces, any matching right brace
-(C<"}">) should also be escaped to avoid confusing the parser, for
-example,
-
-    qr{abc\{def\}ghi}
-
 =item unexec of %s into %s failed!
 
 (F) The unexec() routine failed for some reason.  See your local FSF
 representative, who probably put it there in the first place.
 
+=item Unexpected '(' with no preceding operator in regex; marked by <-- HERE in m/%s/
+
+(F)
+You had something like this:
+
+ (?[ \p{Digit} ( \p{Lao} + \p{Thai} ) ])
+
+There should be an operator before the C<"(">, as there's no indication
+as to how the digits are to be combined with the characters in the Lao
+and Thai scripts.
+
+=item Unexpected ')' in regex; marked by <-- HERE in m/%s/
+
+(F)
+You had something like this:
+
+ (?[ ( \p{Digit} + ) ])
+
+The C<")"> is out-of-place.  Something apparently was supposed to be
+combined with the digits, or the C<"+"> shouldn't be there, or something
+like that.  Perl can't figure out what was intended.
+
+=item Unexpected binary operator '%c' with no preceding operand in regex; marked by <-- HERE in m/%s/
+
+(F)
+You had something like this:
+
+ (?[ | \p{Digit} ])
+
+where the C<"|"> is a binary operator with an operand on the right, but
+no operand on the left.
+
+=item Unexpected character in regex; marked by <-- HERE in m/%s/
+
+(F)
+You had something like this:
+
+ (?[ z ])
+
+Within C<(?[ ])>, no literal characters are allowed unless they are
+within an inner pair of square brackets, like
+
+ (?[ [ z ] ])
+
+Another possibility is that you forgot a backslash.  Perl isn't smart
+enough to figure out what you really meant.
+
 =item Unexpected constant lvalue entersub entry via type/targ %d:%d
 
 (P) When compiling a subroutine call in lvalue context, Perl failed an
@@ -5134,11 +5411,6 @@ problems when being input or output, which is likely where this message
 came from.  If you really really know what you are doing you can turn
 off this warning by C<no warnings 'surrogate';>.
 
-=item Unknown BYTEORDER
-
-(F) There are no byte-swapping functions for a machine with this byte
-order.
-
 =item Unknown charname '%s'
 
 (F) The name you used inside C<\N{}> is unknown to Perl.  Check the
@@ -5238,6 +5510,16 @@ Note that if you want to enable a warnings category registered by a
 module (e.g. C<use warnings 'File::Find'>), you must have loaded this
 module first.
 
+=item Unmatched '%c' in POSIX class in regex; marked by <-- HERE in m/%s/
+
+You had something like this:
+
+ (?[ [:alnum] ])
+
+There should be a second C<":">, like this:
+
+ (?[ [:alnum:] ])
+
 =item Unmatched [ in regex; marked by <-- HERE in m/%s/
 
 (F) The brackets around a character class must match.  If you wish to
@@ -5245,6 +5527,17 @@ include a closing bracket in a character class, backslash it or put it
 first.  The <-- HERE shows whereabouts in the regular expression the
 problem was discovered.  See L<perlre>.
 
+=item Unmatched '[' in POSIX class in regex; marked by <-- HERE in m/%s/
+
+(F)
+You had something like this:
+
+ (?[ [:digit: ])
+
+That should be written:
+
+ (?[ [:digit:] ])
+
 =item Unmatched ( in regex; marked by <-- HERE in m/%s/
 
 =item Unmatched ) in regex; marked by <-- HERE in m/%s/
@@ -5274,6 +5567,13 @@ subroutine.
 in your Perl script (or eval) near the specified column.  Perhaps you tried 
 to run a compressed script, a binary program, or a directory as a Perl program.
 
+=item Unrecognized escape \%c in character class in regex; marked by <-- HERE in m/%s/
+
+(F)
+You used a backslash-character combination which is not recognized by
+Perl inside character classes.  This is a fatal error when the character
+class is used within C<(?[ ])>.
+
 =item Unrecognized escape \%c in character class passed through in regex; 
 marked by <-- HERE in m/%s/
 
@@ -5373,10 +5673,14 @@ instead of:
 
     <<"foo"
 
+=item Unterminated \g... pattern in regex; marked by <-- HERE in m/%s/
+
 =item Unterminated \g{...} pattern in regex; marked by <-- HERE in m/%s/
 
-(F) You missed a close brace on a \g{..} pattern (group reference) in
-a regular expression.  Fix the pattern and retry.
+(F) In a regular expression, you had a C<\g> that wasn't followed by a
+proper group reference.  In the case of C<\g{>, the closing brace is
+missing; otherwise the C<\g> must be followed by an integer.  Fix the
+pattern and retry.
 
 =item Unterminated <> operator
 
@@ -5421,6 +5725,29 @@ See L<Win32> for more information.
 You probably meant to use C<$]> instead.  C<$[> is the base for indexing
 arrays.  C<$]> is the Perl version number in decimal.
 
+=item Use \\x{...} for more than two hex characters in regex; marked by <-- HERE in m/%s/
+
+(F)
+In a regular expression, you said something like
+
+ (?[ [ \xBEEF ] ])
+
+Perl isn't sure if you meant this
+
+ (?[ [ \x{BEEF} ] ])
+
+or if you meant this
+
+ (?[ [ \x{BE} E F ] ])
+
+You need to add either braces or blanks to disambiguate.
+
+=item Use of each() on hash after insertion without resetting hash iterator results in undefined behavior
+
+(S internal) The behavior of C<each()> after insertion is undefined, it may
+skip items, or visit items more than once. Consider using C<keys()> instead
+of C<each()>.
+
 =item Useless assignment to a temporary
 
 (W misc) You assigned to an lvalue subroutine, but what
@@ -5468,6 +5795,31 @@ discovered.  See L<perlre>.
 same length as the replacelist.  See L<perlop> for more information
 about the /d modifier.
 
+=item Useless use of '\'; doesn't escape metacharacter '%c'
+
+(D deprecated) You wrote a regular expression pattern something like
+one of these:
+
+ m{ \x\{FF\} }x
+ m{foo\{1,3\}}
+ qr(foo\(bar\))
+ s[foo\[a-z\]bar][baz]
+
+The interior braces, square brackets, and parentheses are treated as
+metacharacters even though they are backslashed; instead write:
+
+ m{ \x{FF} }x
+ m{foo{1,3}}
+ qr(foo(bar))
+ s[foo[a-z]bar][baz]
+
+The backslashes have no effect when a regular expression pattern is
+delimitted by C<{}>, C<[]>, or C<()>, which ordinarily are
+metacharacters, and the delimiters are also used, paired, within the
+interior of the pattern.  It is planned that a future Perl release will
+change the meaning of constructs like these so that the backslashes
+will have an effect, so remove them from your code.
+
 =item Useless use of \E
 
 (W misc) You have a \E in a double-quotish string without a C<\U>,
@@ -5525,6 +5877,12 @@ about.
 
 This is not very useful, and perl currently optimizes this away.
 
+=item Useless use of (?-p) in regex; marked by <-- HERE in m/%s/
+
+(W regexp)
+The C<p> modifier cannot be turned off once set.  Trying to do so is
+futile.
+
 =item Useless use of %s with no values
 
 (W syntax) You used the push() or unshift() function with no arguments
@@ -5534,6 +5892,20 @@ 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 Useless (%s%c) - %suse /%c modifier in regex; marked by <-- HERE in m/%s/
+
+(W regexp)
+The C</g> and C</o> regular expression modifiers are global and can't be
+turned off once set; hence things like C<(?g)> or C<(?-o:)> do nothing.
+
+=item Useless (%sc) - %suse /gc modifier in regex; marked by <-- HERE in m/%s/
+
+(W regexp)
+The C</c> regular expression modifier is global, can't be turned off
+once set, and doesn't do anything without the C</g> modifier being
+specified as well; hence things like C<(?c)> or C<(?-c:)> do nothing,
+nor do thing like C<(?gc)> nor C<(?-gc:)> .
+
 =item "use" not allowed in expression
 
 (F) The "use" keyword is recognized and executed at compile time, and
@@ -5655,11 +6027,11 @@ old way has bad side effects.
 it already went past any symlink you are presumably trying to look for.
 The operation returned C<undef>.  Use a filename instead.
 
-=item Use of my $_ is deprecated
+=item Use of my $_ is experimental
 
-(D deprecated) Lexical $_ is deprecated because of
-its confusing side-effects.  Consider using C<local $_>
-instead.  See the explanation under L<perlvar/$_>.
+(S experimental::lexical_topic) Lexical $_ is an experimental feature and
+its behavior may change or even be removed in any future release of perl.
+See the explanation under L<perlvar/$_>.
 
 =item Use of %s on a handle without * is deprecated
 
@@ -5692,11 +6064,11 @@ C<$array[0+$ref]>.  This warning is not given for overloaded objects,
 however, because you can overload the numification and stringification
 operators and then you presumably know what you are doing.
 
-=item Use of state $_ is deprecated
+=item Use of state $_ is experimental
 
-(D deprecated) Lexical $_ is deprecated because of
-its confusing side-effects.  Consider using C<local $_>
-instead.  See the explanation under L<perlvar/$_>.
+(S experimental::lexical_topic) Lexical $_ is an experimental feature and
+its behavior may change or even be removed in any future release of perl.
+See the explanation under L<perlvar/$_>.
 
 =item Use of tainted arguments in %s is deprecated
 
@@ -5908,6 +6280,14 @@ but in actual fact, you got
 
 So put in parentheses to say what you really mean.
 
+=item when is experimental
+
+(S experimental::smartmatch) C<when> depends on smartmatch, which is
+experimental.  Additionally, it has several special cases that may
+not be immediately obvious, and their behavior may change or
+even be removed in any future release of perl.
+See the explanation under L<perlsyn/Experimental Details on given and when>.
+
 =item Wide character in %s
 
 (S utf8) Perl met a wide character (>255) when it wasn't expecting
@@ -5933,9 +6313,9 @@ before now.  Check your control flow.
 
 =item %s "\x%X" does not map to Unicode
 
-(F) When reading in different encodings Perl tries to map everything
+(F) When reading in different encodings, Perl tries to map everything
 into Unicode characters.  The bytes you read in are not legal in
-this encoding, for example
+this encoding.  For example
 
     utf8 "\xE4" does not map to Unicode