This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Warn on unescaped /[]}]/ under re strict
[perl5.git] / pod / perldiag.pod
index 0383ccb..4de4574 100644 (file)
@@ -221,6 +221,22 @@ Auto-decrement> for details.
 (W syntax) You called stat() on an array, but the array will be
 coerced to a scalar - the number of elements in the array.
 
+=item A signature parameter must start with '$', '@' or '%'
+
+(F) Each subroutine signature parameter declaration must start with a valid
+sigil; for example:
+
+    sub foo ($a, $, $b = 1, @c) {}
+
+=item A slurpy parameter may not have a default value
+
+(F) Only scalar subroutine signature parameters may have a default value;
+for example:
+
+    sub foo ($a = 1)        {} # legal
+    sub foo (@a = (1))      {} # invalid
+    sub foo (%a = (a => b)) {} # invalid
+
 =item assertion botched: %s
 
 (X) The malloc package that comes with Perl had an internal failure.
@@ -532,6 +548,22 @@ a bareword:
 
 The C<strict> pragma is useful in avoiding such errors.
 
+=item Bareword in require contains "%s"
+
+=item Bareword in require maps to disallowed filename "%s"
+
+=item Bareword in require maps to empty filename
+
+(F) The bareword form of require has been invoked with a filename which could
+not have been generated by a valid bareword permitted by the parser.  You
+shouldn't be able to get this error from Perl code, but XS code may throw it
+if it passes an invalid module name to C<Perl_load_module>.
+
+=item Bareword in require must not start with a double-colon: "%s"
+
+(F) In C<require Bare::Word>, the bareword is not allowed to start with a
+double-colon.  Write C<require ::Foo::Bar> as  C<require Foo::Bar> instead.
+
 =item Bareword "%s" not allowed while "strict subs" in use
 
 (F) With "strict subs" in use, a bareword is only allowed as a
@@ -703,9 +735,9 @@ Perl code, but are only used internally.
 
 (F) Some XS code tried to use C<sv_catpvfn()> or a related function with a
 format string that specifies explicit indexes for some of the elements, and
-using a C-style variable-argument list (a C<va_list>). This is not currently
-supported. XS authors wanting to do this must instead construct a C array of
-C<SV*> scalars containing the arguments.
+using a C-style variable-argument list (a C<va_list>).  This is not currently
+supported.  XS authors wanting to do this must instead construct a C array
+of C<SV*> scalars containing the arguments.
 
 =item Can only compress unsigned integers in pack
 
@@ -1702,7 +1734,23 @@ being readable by a later Perl.
 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
+  #!/usr/bin/perl
+
+=item %s: command not found
+
+(A) You've accidentally run your script through B<bash> or another shell
+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
+
+=item %s: command not found: %s
+
+(A) You've accidentally run your script through B<zsh> or another shell
+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
 
 =item Compilation failed in require
 
@@ -1861,6 +1909,18 @@ valid magic number.
 you have also specified an explicit size for the string.  See
 L<perlfunc/pack>.
 
+=item Declaring references is experimental
+
+(S experimental::declared_refs) This warning is emitted if you use
+a reference constructor on the right-hand side of C<my>, C<state>, C<our>, or
+C<local>.  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::declared_refs";
+    use feature "declared_refs";
+    $fooref = my \$foo;
+
 =for comment
 The following are used in lib/diagnostics.t for testing two =items that
 share the same description.  Changes here need to be propagated to there
@@ -1951,7 +2011,7 @@ than to create a dangling reference.
 
 =item Did not produce a valid header
 
-See Server error.
+See L</500 Server error>.
 
 =item %s did not return a true value
 
@@ -1984,7 +2044,7 @@ you called it with no args and C<$@> was empty.
 
 =item Document contains no data
 
-See Server error.
+See L</500 Server error>.
 
 =item %s does not define %s::VERSION--version check failed
 
@@ -2054,6 +2114,11 @@ unlikely to be what you want.
 described in L<perlunicode> and L<perlre>.  You used C<\p> or C<\P> in
 a regular expression without specifying the property name.
 
+=item ${^ENCODING} is no longer supported
+
+(D deprecated) The special variable C<${^ENCODING}>, formerly used to implement
+the C<encoding> pragma, is no longer supported as of Perl 5.26.0.
+
 =item entering effective %s failed
 
 (F) While under the C<use filetest> pragma, switching the real and
@@ -2204,14 +2269,6 @@ has been removed.  The C<postderef> feature may meet your needs better.
     use feature "signatures";
     sub foo ($left, $right) { ... }
 
-=item Experimental "%s" subs not enabled
-
-(F) To use lexical subs, you must first enable them:
-
-    no warnings 'experimental::lexical_subs';
-    use feature 'lexical_subs';
-    my sub foo { ... }
-
 =item Explicit blessing to '' (assuming package main)
 
 (W misc) You are blessing a reference to a zero length string.  This has
@@ -2464,13 +2521,6 @@ created on an emergency basis to prevent a core dump.
 (F) The parser has given up trying to parse the program after 10 errors.
 Further error messages would likely be uninformative.
 
-=item Having more than one /%c regexp modifier is deprecated
-
-(D deprecated, regexp) You used the indicated regular expression pattern
-modifier at least twice in a string of modifiers.  It is deprecated to
-do this with this particular modifier, to allow future extensions to the
-Perl language.
-
 =item Hexadecimal float: exponent overflow
 
 (W overflow) The hexadecimal floating point has a larger exponent
@@ -2479,7 +2529,9 @@ than the floating point supports.
 =item Hexadecimal float: exponent underflow
 
 (W overflow) The hexadecimal floating point has a smaller exponent
-than the floating point supports.
+than the floating point supports.  With the IEEE 754 floating point,
+this may also mean that the subnormals (formerly known as denormals)
+are being used, which may or may not be an error.
 
 =item Hexadecimal float: internal error (%s)
 
@@ -2544,11 +2596,27 @@ or '%', since those two will accept 0 or more final parameters.
 
 =item Illegal character \%o (carriage return)
 
-(F) Perl normally treats carriage returns in the program text as it
-would any other whitespace, which means you should never see this error
-when Perl was built using standard options.  For some reason, your
-version of Perl appears to have been built without this support.  Talk
-to your Perl administrator.
+(F) Perl normally treats carriage returns in the program text as
+it would any other whitespace, which means you should never see
+this error when Perl was built using standard options.  For some
+reason, your version of Perl appears to have been built without
+this support.  Talk to your Perl administrator.
+
+=item Illegal character following sigil in a subroutine signature
+
+(F) A parameter in a subroutine signature contained an unexpected character
+following the C<$>, C<@> or C<%> sigil character.  Normally the sigil
+should be followed by the variable name or C<=> etc.  Perhaps you are
+trying use a prototype while in the scope of C<use feature 'signatures'>?
+For example:
+
+    sub foo ($$) {}            # legal - a prototype
+
+    use feature 'signatures;
+    sub foo ($$) {}            # illegal - was expecting a signature
+    sub foo ($a, $b)
+            :prototype($$) {}  # legal
+
 
 =item Illegal character in prototype for %s : %s
 
@@ -2665,6 +2733,26 @@ parent '%s'
 C3-consistent, and you have enabled the C3 MRO for this class.  See the C3
 documentation in L<mro> for more information.
 
+=item Indentation on line %d of here-doc doesn't match delimiter
+
+(F) You have an indented here-document where one or more of its lines
+have whitespace at the beginning that does not match the closing
+delimiter.
+
+For example, line 2 below is wrong because it does not have at least
+2 spaces, but lines 1 and 3 are fine because they have at least 2:
+
+    if ($something) {
+      print <<~EOF;
+        Line 1
+       Line 2 not
+          Line 3
+        EOF
+    }
+
+Note that tabs and spaces are compared strictly, meaning 1 tab will
+not match 8 spaces.
+
 =item Infinite recursion in regex
 
 (F) You used a pattern that references itself without consuming any input
@@ -2673,11 +2761,10 @@ either consume text or fail.
 
 =item Initialization of state variables in list context currently forbidden
 
-(F) Currently the implementation of "state" only permits the
-initialization of scalar variables in scalar context.  Re-write
-C<state ($a) = 42> as C<state $a = 42> to change from list to scalar
-context.  Constructions such as C<state (@a) = foo()> will be
-supported in a future perl release.
+(F) C<state> only permits initializing a single scalar variable, in scalar
+context.  So C<state $a = 42> is allowed, but not C<state ($a) = 42>.  To apply
+state semantics to a hash or array, store a hash or array reference in a
+scalar variable.
 
 =item %%s[%s] in scalar context better written as $%s[%s]
 
@@ -3006,7 +3093,7 @@ L<perlrebackslash/\b{}, \b, \B{}, \B>.
 
 =item %s() is deprecated on :utf8 handles
 
-(W deprecated) The sysread(), recv(), syswrite() and send() operators are
+(D deprecated) The sysread(), recv(), syswrite() and send() operators are
 deprecated on handles that have the C<:utf8> layer, either explicitly, or
 implicitly, eg., with the C<:encoding(UTF-16LE)> layer.
 
@@ -3277,10 +3364,13 @@ Perhaps the function's author was trying to write a subroutine signature
 but didn't enable that feature first (C<use feature 'signatures'>),
 so the signature was instead interpreted as a bad prototype.
 
-=item Malformed UTF-8 character (%s)
+=item Malformed UTF-8 character%s
 
-(S utf8)(F) Perl detected a string that didn't comply with UTF-8
-encoding rules, even though it had the UTF8 flag on.
+(S utf8)(F) Perl detected a string that should be UTF-8, but didn't
+comply with UTF-8 encoding rules, or represents a code point whose
+ordinal integer value doesn't fit into the word size of the current
+platform (overflows).  Details as to the exact malformation are given in
+the variable, C<%s>, part of the message.
 
 One possible cause is that you set the UTF8 flag yourself for data that
 you thought to be in UTF-8 but it wasn't (it was for example legacy
@@ -3400,7 +3490,7 @@ doesn't resolve to a valid subroutine.  See L<overload>.
 
 =item Method %s not permitted
 
-See Server error.
+See L</500 Server error>.
 
 =item Might be a runaway multi-line %s string starting on line %d
 
@@ -3478,11 +3568,12 @@ can vary from one line to the next.
 (S syntax) This is an educated guess made in conjunction with the message
 "%s found where operator expected".  Often the missing operator is a comma.
 
-=item Missing or undefined argument to require
+=item Missing or undefined argument to %s
 
-(F) You tried to call require with no argument or with an undefined
+(F) You tried to call require or do with no argument or with an undefined
 value as an argument.  Require expects either a package name or a
-file-specification as an argument.  See L<perlfunc/require>.
+file-specification as an argument; do expects a filename.  See
+L<perlfunc/require EXPR> and L<perlfunc/do EXPR>.
 
 =item Missing right brace on \%c{} in regex; marked by S<<-- HERE> in m/%s/
 
@@ -3607,6 +3698,15 @@ mutable before freeing the ops.
 (W syntax) Multidimensional arrays aren't written like C<$foo[1,2,3]>.
 They're written like C<$foo[1][2][3]>, as in C.
 
+=item Multiple slurpy parameters not allowed
+
+(F) In subroutine signatures, a slurpy parameter (C<@> or C<%>) must be
+the last parameter, and there must not be more than one of them; for
+example:
+
+    sub foo ($a, @b)    {} # legal
+    sub foo ($a, @b, %) {} # invalid
+
 =item '/' must follow a numeric type in unpack
 
 (F) You had an unpack template that contained a '/', but this did not
@@ -3986,18 +4086,25 @@ kind of ref it really was.  See L<perlref>.
 reference to something else instead.  You can use the ref() function to
 find out what kind of ref it really was.  See L<perlref>.
 
+=item '#' not allowed immediately following a sigil in a subroutine signature
+
+(F) In a subroutine signature definition, a comment following a sigil
+(C<$>, C<@> or C<%>), needs to be separated by whitespace or a commma etc., in
+particular to avoid confusion with the C<$#> variable.  For example:
+
+    # bad
+    sub f ($# ignore first arg
+           , $b) {}
+    # good
+    sub f ($, # ignore first arg
+           $b) {}
+
 =item Not an ARRAY reference
 
 (F) Perl was trying to evaluate a reference to an array value, but found
 a reference to something else instead.  You can use the ref() function
 to find out what kind of ref it really was.  See L<perlref>.
 
-=item Not an unblessed ARRAY reference
-
-(F) You passed a reference to a blessed array to C<push>, C<shift> or
-another array function.  These only accept unblessed array references
-or arrays beginning explicitly with C<@>.
-
 =item Not a SCALAR reference
 
 (F) Perl was trying to evaluate a reference to a scalar value, but found
@@ -4339,10 +4446,6 @@ able to initialize properly.
 
 (P) Failed an internal consistency check trying to compile a grep.
 
-=item panic: ck_split, type=%u
-
-(P) Failed an internal consistency check trying to compile a split.
-
 =item panic: corrupt saved stack index %ld
 
 (P) The savestack was requested to restore more localized values than
@@ -4469,10 +4572,6 @@ and freeing temporaries and lexicals from.
 (P) The internal pp_match() routine was called with invalid operational
 data.
 
-=item panic: pp_split, pm=%p, s=%p
-
-(P) Something terrible went wrong in setting up for the split.
-
 =item panic: realloc, %s
 
 (P) Something requested a negative number of bytes of realloc.
@@ -4527,6 +4626,12 @@ was string.
 (P) The compiler is screwed up and attempted to use an op that isn't
 permitted at run time.
 
+=item panic: unknown OA_*: %x
+
+(P) The internal routine that handles arguments to C<&CORE::foo()>
+subroutine calls was unable to determine what type of arguments
+were expected.
+
 =item panic: utf16_to_utf8: odd bytelen
 
 (P) Something tried to call utf16_to_utf8 with an odd (as opposed
@@ -4558,17 +4663,6 @@ Remember that "my", "our", "local" and "state" bind tighter than comma.
 (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
 
 (F) You used a pattern that uses too many nested subpattern calls without
@@ -4872,7 +4966,7 @@ of "||".
 
 =item Premature end of script headers
 
-See Server error.
+See L</500 Server error>.
 
 =item printf() on closed filehandle %s
 
@@ -5368,7 +5462,7 @@ in the regular expression the problem was discovered.
 (F) An C<(?R)> or C<(?0)> sequence in a regular expression was missing the
 final parenthesis.
 
-=item Server error (a.k.a. "500 Server error")
+=item Z<>500 Server error
 
 (A) This is the error message generally seen in a browser window
 when trying to run a CGI program (including SSI) over the web.  The
@@ -5446,7 +5540,7 @@ setting C<$/> to undef, with the exception that this warning would be
 thrown.
 
 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
+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
@@ -5851,22 +5945,18 @@ think the U.S. Government thinks it's a secret, or at least that they
 will continue to pretend that it is.  And if you quote me on that, I
 will deny it.
 
-=item The %s function is unimplemented
+=item The experimental declared_refs feature is not enabled
 
-(F) The function indicated isn't implemented on this architecture,
-according to the probings of Configure.
+(F) To declare references to variables, as in C<my \%x>, you must first enable
+the feature:
 
-=item The lexical_subs feature is experimental
+    no warnings "experimental::declared_refs";
+    use feature "declared_refs";
 
-(S experimental::lexical_subs) This warning is emitted if you
-declare a sub with C<my> or C<state>.  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:
+=item The %s function is unimplemented
 
-    no warnings "experimental::lexical_subs";
-    use feature "lexical_subs";
-    my sub foo { ... }
+(F) The function indicated isn't implemented on this architecture,
+according to the probings of Configure.
 
 =item The regex_sets feature is experimental
 
@@ -5962,10 +6052,9 @@ system call to call, silly dilly.
 
 =item Too few arguments for subroutine
 
-(F) A subroutine using a signature received fewer arguments than required
-by the signature.  The caller of the subroutine is presumably at fault.
-Inconveniently, this error will be reported at the location of the
-subroutine, not that of the caller.
+(F) A subroutine using a signature received too few arguments than
+required by the signature.  The caller of the subroutine is presumably
+at fault.
 
 =item Too late for "-%s" option
 
@@ -5999,10 +6088,10 @@ BEGIN block.
 
 =item Too many arguments for subroutine
 
-(F) A subroutine using a signature received more arguments than required
-by the signature.  The caller of the subroutine is presumably at fault.
-Inconveniently, this error will be reported at the location of the
-subroutine, not that of the caller.
+(F) A subroutine using a signature received too many arguments than
+required by the signature.  The caller of the subroutine is presumably
+at fault.
+
 
 =item Too many )'s
 
@@ -6126,17 +6215,137 @@ 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;
+=item Unescaped left brace in regex is deprecated here, passed through in
+regex; marked by S<<-- HERE> in m/%s/
+
+(D deprecated, regexp)  The simple rule to remember, if you want to
+match a literal C<"{"> character (U+007B C<LEFT CURLY BRACKET>) in a
+regular expression pattern, is to escape each literal instance of it in
+some way.  Generally easiest is to precede it with a backslash, like
+C<"\{"> or enclose it in square brackets (C<"[{]">).  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}
+
+Forcing literal C<"{"> characters to be escaped will enable the Perl
+language to be extended in various ways in future releases.  To avoid
+needlessly breaking existing code, the restriction is is not enforced in
+contexts where there are unlikely to ever be extensions that could
+conflict with the use there of C<"{"> as a literal.
+
+In this release of Perl, some literal uses of C<"{"> are fatal, and some
+still just deprecated.  This is because of an oversight:  some uses of a
+literal C<"{"> that should have raised a deprecation warning starting in
+v5.20 did not warn until v5.26.  By making the already-warned uses fatal
+now, some of the planned extensions can be made to the language sooner.
+
+The contexts where no warnings or errors are raised are:
+
+=over 4
+
+=item *
+
+as the first character in a pattern, or following C<"^"> indicating to
+anchor the match to the beginning of a line.
+
+=item *
+
+as the first character following a C<"|"> indicating alternation.
+
+=item *
+
+as the first character in a parenthesized grouping like
+
+ /foo({bar)/
+ /foo(?:{bar)/
+
+=item *
+
+as the first character following a quantifier
+
+ /\s*{/
+
+=back
+
+=for comment
+The text of the message above is duplicated below to allow splain (and
+'use diagnostics') to work.  Since one is fatal, and one not, they can't
+be combined as one message.  And since the non-fatal one is temporary,
+there's no real need to enhance perldiag to handle this transient case.
+
+=item Unescaped left brace in regex is illegal here in regex;
 marked by S<<-- 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.26) 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,
+(F) The simple rule to remember, if you want to
+match a literal C<"{"> character (U+007B C<LEFT CURLY BRACKET>) in a
+regular expression pattern, is to escape each literal instance of it in
+some way.  Generally easiest is to precede it with a backslash, like
+C<"\{"> or enclose it in square brackets (C<"[{]">).  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}
+
+Forcing literal C<"{"> characters to be escaped will enable the Perl
+language to be extended in various ways in future releases.  To avoid
+needlessly breaking existing code, the restriction is is not enforced in
+contexts where there are unlikely to ever be extensions that could
+conflict with the use there of C<"{"> as a literal.
+
+In this release of Perl, some literal uses of C<"{"> are fatal, and some
+still just deprecated.  This is because of an oversight:  some uses of a
+literal C<"{"> that should have raised a deprecation warning starting in
+v5.20 did not warn until v5.26.  By making the already-warned uses fatal
+now, some of the planned extensions can be made to the language sooner.
+
+The contexts where no warnings or errors are raised are:
+
+=over 4
 
-    qr{abc\{def\}ghi}
+=item *
+
+as the first character in a pattern, or following C<"^"> indicating to
+anchor the match to the beginning of a line.
+
+=item *
+
+as the first character following a C<"|"> indicating alternation.
+
+=item *
+
+as the first character in a parenthesized grouping like
+
+ /foo({bar)/
+ /foo(?:{bar)/
+
+=item *
+
+as the first character following a quantifier
+
+ /\s*{/
+
+=back
+
+=item Unescaped literal '%c' in regex; marked by <-- HERE in m/%s/
+
+(W regexp) (only under C<S<use re 'strict'>>)
+
+Within the scope of C<S<use re 'strict'>> in a regular expression
+pattern, you included an unescaped C<}> or C<]> which was interpreted
+literally.  These two characters are sometimes metacharacters, and
+sometimes literals, depending on what precedes them in the
+pattern.  This is unlike the similar C<)> which is always a
+metacharacter unless escaped.
+
+This action at a distance, perhaps a large distance, can lead to Perl
+silently misinterpreting what you meant, so when you specify that you
+want extra checking by C<S<use re 'strict'>>, this warning is generated.
+If you meant the character as a literal, simply confirm that to Perl by
+preceding the character with a backslash, or make it into a bracketed
+character class (like C<[}]>).  If you meant it as closing a
+corresponding C<[> or C<{>, you'll need to look back through the pattern
+to find out why that isn't happening.
 
 =item unexec of %s into %s failed!
 
@@ -6228,12 +6437,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 charname '' is deprecated
-
-(D deprecated) You had a C<\N{}> with nothing between the braces.  This
-usage is deprecated, and will be made a syntax error in a future Perl
-version.
-
 =item Unknown charname '%s'
 
 (F) The name you used inside C<\N{}> is unknown to Perl.  Check the
@@ -6244,6 +6447,12 @@ exactly, regardless of whether C<:loose> is used or not.)  This error may
 also happen if the C<\N{}> is not in the scope of the corresponding
 C<S<use charnames>>.
 
+=item Unknown charname '' is deprecated
+
+(D deprecated) You had a C<\N{}> with nothing between the braces.  This
+usage is deprecated, and will be made a syntax error in a future Perl
+version.
+
 =item Unknown error
 
 (P) Perl was about to print an error message in C<$@>, but the C<$@> variable
@@ -6709,7 +6918,10 @@ points up to 0x10FFFF, but Perl allows much larger ones.  However, the
 largest possible ones break the perl interpreter in some constructs,
 including causing it to hang in a few cases.  The known problem areas
 are in C<tr///>, regular expression pattern matching using quantifiers,
-and as the upper limits in loops.
+as quote delimiters in C<qI<X>...I<X>> (where I<X> is the C<chr()> of a large
+code point), and as the upper limits in loops.
+There may be other breakages as well.  If you get this warning, and
+things aren't working correctly, you probably have found one of these.
 
 If your code is to run on various platforms, keep in mind that the upper
 limit depends on the platform.  It is much larger on 64-bit word sizes
@@ -6726,6 +6938,13 @@ separated by commas, not just aligned on a line.
 it may skip items, or visit items more than once.  Consider using
 C<keys()> instead of C<each()>.
 
+=item Infinite recursion via empty pattern
+
+(F) You tried to use the empty pattern inside of a regex code block,
+for instance C</(?{ s!!! })/>, which resulted in re-executing
+the same pattern, which is an infinite loop which is broken by
+throwing an exception.
+
 =item Use of := for an empty attribute list is not allowed
 
 (F) The construction C<my $x := 42> used to parse as equivalent to
@@ -6857,6 +7076,31 @@ arguments and at least one of them is tainted.  This used to be allowed
 but will become a fatal error in a future version of perl.  Untaint your
 arguments.  See L<perlsec>.
 
+=item Use of unassigned code point or non-standalone grapheme for a
+delimiter will be a fatal error starting in Perl v5.30
+
+(D deprecated)
+A grapheme is what appears to a native-speaker of a language to be a
+character.  In Unicode (and hence Perl) a grapheme may actually be
+several adjacent characters that together form a complete grapheme.  For
+example, there can be a base character, like "R" and an accent, like a
+circumflex "^", that appear when displayed to be a single character with
+the circumflex hovering over the "R".  Perl currently allows things like
+that circumflex to be delimiters of strings, patterns, I<etc>.  When
+displayed, the circumflex would look like it belongs to the character
+just to the left of it.  In order to move the language to be able to
+accept graphemes as delimiters, we have to deprecate the use of
+delimiters which aren't graphemes by themselves.  Also, a delimiter must
+already be assigned (or known to be never going to be assigned) to try
+to future-proof code, for otherwise code that works today would fail to
+compile if the currently unassigned delimiter ends up being something
+that isn't a stand-alone grapheme.  Because Unicode is never going to
+assign
+L<non-character code points|perlunicode/Noncharacter code points>, nor
+L<code points that are above the legal Unicode maximum|
+perlunicode/Beyond Unicode code points>, those can be delimiters, and
+their use won't raise this warning.
+
 =item Use of uninitialized value%s
 
 (W uninitialized) An undefined value was used as if it were already
@@ -6996,7 +7240,7 @@ front of your variable.
 (F) Lookbehind is allowed only for subexpressions whose length is fixed and
 known at compile time.  For positive lookbehind, you can use the C<\K>
 regex construct as a way to get the equivalent functionality.  See
-L<perlre/(?<=pattern) \K>.
+L<(?<=pattern) and \K in perlre|perlre/\K>.
 
 There are non-obvious Unicode rules under C</i> that can match variably,
 but which you might not think could.  For example, the substring C<"ss">
@@ -7057,6 +7301,12 @@ S<<-- HERE> in m/%s/
 (F) You used a verb pattern that is not allowed an argument.  Remove the 
 argument or check that you are using the right verb.
 
+=item Version control conflict marker
+
+(F) The parser found a line starting with C<E<lt><<<<<<>,
+C<E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>E<gt>>, or C<=======>.  These may be left by a
+version control system to mark conflicts after a failed merge operation.
+
 =item Version number must be a constant number
 
 (P) The attempt to translate a C<use Module n.n LIST> statement into
@@ -7093,8 +7343,8 @@ when its reference count reached zero while it was still open, e.g.:
 
 Because various errors may only be detected by close() (e.g. buffering could
 allow the C<print> in this example to return true even when the disk is full),
-it is dangerous to ignore its result. So when it happens implicitly, perl will
-signal errors by warning.
+it is dangerous to ignore its result.  So when it happens implicitly, perl
+will signal errors by warning.
 
 B<Prior to version 5.22.0, perl ignored such errors>, so the common idiom shown
 above was liable to cause B<silent data loss>.