This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldiag: more sorting
[perl5.git] / pod / perldiag.pod
index 5e2d0a1..4a3a3d0 100644 (file)
@@ -4745,11 +4745,17 @@ subvert Perl's population of %ENV for nefarious purposes.
 =item Unknown switch condition (?(%s in regex; marked by <-- HERE in m/%s/
 
 (F) The condition part of a (?(condition)if-clause|else-clause) construct
 =item Unknown switch condition (?(%s in regex; marked by <-- HERE in m/%s/
 
 (F) The condition part of a (?(condition)if-clause|else-clause) construct
-is not known. The condition may be lookahead or lookbehind (the condition
-is true if the lookahead or lookbehind 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
-matched).
+is not known. The condition must be one of the following:
+
+  (1) (2) ...        true if 1st, 2nd, etc., capture matched
+  (<NAME>) ('NAME')  true if named capture matched
+  (?=...) (?<=...)   true if subpattern matches
+  (?!...) (?<!...)   true if subpattern fails to match
+  (?{ CODE })        true if code returns a true value
+  (R)                true if evaluating inside recursion
+  (R1) (R2) ...      true if directly inside capture group 1, 2, etc.
+  (R&NAME)           true if directly inside named capture
+  (DEFINE)           always false; for defining named subpatterns
 
 The <-- HERE shows in the regular expression about where the problem was
 discovered.  See L<perlre>.
 
 The <-- HERE shows in the regular expression about where the problem was
 discovered.  See L<perlre>.
@@ -4770,15 +4776,14 @@ of the C<-C> switch for the list of known options.
 after an open brace in your pattern.  Check the pattern and review
 L<perlre> for details on legal verb patterns.
 
 after an open brace in your pattern.  Check the pattern and review
 L<perlre> for details on legal verb patterns.
 
-first.
-
 =item Unknown warnings category '%s'
 
 (F) An error issued by the C<warnings> pragma. You specified a warnings
 category that is unknown to perl at this point.
 
 =item Unknown warnings category '%s'
 
 (F) An error issued by the C<warnings> pragma. You specified a warnings
 category that is unknown to perl at this point.
 
-Note that if you want to enable a warnings category registered by a module
-(e.g. C<use warnings 'File::Find'>), you must have imported this module
+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 [ in regex; marked by <-- HERE in m/%s/
 
 
 =item unmatched [ in regex; marked by <-- HERE in m/%s/
 
@@ -4901,16 +4906,6 @@ character to get your parentheses to balance.  See L<attributes>.
 compressed integer format and could not be converted to an integer.
 See L<perlfunc/pack>.
 
 compressed integer format and could not be converted to an integer.
 See L<perlfunc/pack>.
 
-=item Unterminated verb pattern in regex; marked by <-- HERE in m/%s/
-
-(F) You used a pattern of the form C<(*VERB)> but did not terminate
-the pattern with a C<)>. Fix the pattern and retry.
-
-=item Unterminated verb pattern argument in regex; marked by <-- HERE in m/%s/
-
-(F) You used a pattern of the form C<(*VERB:ARG)> but did not terminate
-the pattern with a C<)>. Fix the pattern and retry.
-
 =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
 =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
@@ -4923,6 +4918,16 @@ a term, so it's looking for the corresponding right angle bracket, and
 not finding it.  Chances are you left some needed parentheses out
 earlier in the line, and you really meant a "less than".
 
 not finding it.  Chances are you left some needed parentheses out
 earlier in the line, and you really meant a "less than".
 
+=item Unterminated verb pattern argument in regex; marked by <-- HERE in m/%s/
+
+(F) You used a pattern of the form C<(*VERB:ARG)> but did not terminate
+the pattern with a C<)>. Fix the pattern and retry.
+
+=item Unterminated verb pattern in regex; marked by <-- HERE in m/%s/
+
+(F) You used a pattern of the form C<(*VERB)> but did not terminate
+the pattern with a C<)>. Fix the pattern and retry.
+
 =item untie attempted while %d inner references still exist
 
 (W untie) A copy of the object returned from C<tie> (or C<tied>) was
 =item untie attempted while %d inner references still exist
 
 (W untie) A copy of the object returned from C<tie> (or C<tied>) was
@@ -5090,15 +5095,6 @@ error, so C<:=> can be reclaimed as a new operator in the future.
 If you need an empty attribute list, for example in a code generator, add
 a space before the C<=>.
 
 If you need an empty attribute list, for example in a code generator, add
 a space before the C<=>.
 
-=item Use of ?PATTERN? without explicit operator is deprecated
-
-(D deprecated) You have written something like C<?\w?>, for a regular
-expression that matches only once.  Starting this term directly with
-the question mark delimiter is now deprecated, so that the question mark
-will be available for use in new operators in the future.  Write C<m?\w?>
-instead, explicitly using the C<m> operator: the question mark delimiter
-still invokes match-once behaviour.
-
 =item Use of freed value in iteration
 
 (F) Perhaps you modified the iterated array within the loop?
 =item Use of freed value in iteration
 
 (F) Perhaps you modified the iterated array within the loop?
@@ -5188,6 +5184,15 @@ name. So no namespace is current at all. Using this can cause many
 otherwise reasonable constructs to fail in baffling ways. C<use strict;>
 instead.
 
 otherwise reasonable constructs to fail in baffling ways. C<use strict;>
 instead.
 
+=item Use of ?PATTERN? without explicit operator is deprecated
+
+(D deprecated) You have written something like C<?\w?>, for a regular
+expression that matches only once.  Starting this term directly with
+the question mark delimiter is now deprecated, so that the question mark
+will be available for use in new operators in the future.  Write C<m?\w?>
+instead, explicitly using the C<m> operator: the question mark delimiter
+still invokes match-once behaviour.
+
 =item Use of qw(...) as parentheses is deprecated
 
 (D deprecated) You have something like C<foreach $x qw(a b c) {...}>,
 =item Use of qw(...) as parentheses is deprecated
 
 (D deprecated) You have something like C<foreach $x qw(a b c) {...}>,