This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: pmdynflags and thread safety
[perl5.git] / pod / perldiag.pod
index 26c2bf5..eeef207 100644 (file)
@@ -493,6 +493,11 @@ then tried to access that symbol via conventional Perl syntax. The access
 triggers Perl to autovivify that typeglob, but it there is no legal conversion
 from that type of reference to a typeglob.
 
+=item Cannot copy to %s in %s
+
+(P) Perl detected an attempt to copy a value to an internal type that cannot
+be directly assigned not.
+
 =item Can only compress unsigned integers in pack
 
 (F) An argument to pack("w",...) was not an integer.  The BER compressed
@@ -2258,12 +2263,19 @@ when the function is called.
 
 =item Malformed UTF-8 character (%s)
 
-(S utf8) (F) Perl detected something that didn't comply with UTF-8
-encoding rules.
+(S utf8) (F) Perl detected a string that didn't comply with UTF-8
+encoding rules, even though it had the UTF8 flag on.
+
+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
+8-bit data). To guard against this, you can use Encode::decode_utf8.
+
+If you use the C<:encoding(UTF-8)> PerlIO layer for input, invalid byte
+sequences are handled gracefully, but if you use C<:utf8>, the flag is
+set without validating the data, possibly resulting in this error
+message.
 
-One possible cause is that you read in data that you thought to be in
-UTF-8 but it wasn't (it was for example legacy 8-bit data).  Another
-possibility is careless use of utf8::upgrade().
+See also L<Encode/"Handling Malformed Data">.
 
 =item Malformed UTF-16 surrogate
 
@@ -2285,6 +2297,14 @@ rules and perl was unable to guess how to make more progress.
 (F) You tried to unpack something that didn't comply with UTF-8 encoding
 rules and perl was unable to guess how to make more progress.
 
+=item Maximal count of pending signals (%s) exceeded
+
+(F) Perl aborted due to a too important number of signals pending. This
+usually indicates that your operating system tried to deliver signals
+too fast (with a very high priority), starving the perl process from
+resources it would need to reach a point where it can process signals
+safely. (See L<perlipc/"Deferred Signals (Safe Signals)">.)
+
 =item %s matches null string many times in regex; marked by <-- HERE in m/%s/
 
 (W regexp) The pattern you've specified would be an infinite loop if the
@@ -2816,6 +2836,20 @@ that isn't open.  Check your control flow.  See also L<perlfunc/-X>.
 
 (S internal) An internal warning that the grammar is screwed up.
 
+=item Opening dirhandle %s also as a file
+
+(W io deprecated) You used open() to associate a filehandle to
+a symbol (glob or scalar) that already holds a dirhandle.
+Although legal, this idiom might render your code confusing
+and is deprecated.
+
+=item Opening filehandle %s also as a directory
+
+(W io deprecated) You used opendir() to associate a dirhandle to
+a symbol (glob or scalar) that already holds a filehandle.
+Although legal, this idiom might render your code confusing
+and is deprecated.
+
 =item Operation "%s": no method found, %s
 
 (F) An attempt was made to perform an overloaded operation for which no
@@ -3496,10 +3530,9 @@ discovered.
 
 =item Reference to nonexistent or unclosed group in regex; marked by <-- HERE in m/%s/
 
-(F) You used something like C<\R7> in your regular expression, but there are
+(F) You used something like C<\g{-7}> in your regular expression, but there are
 not at least seven sets of closed capturing parentheses in the expression before
-where the C<\R7> was located. It's also possible you forgot to escape the
-backslash.
+where the C<\g{-7}> was located.
 
 The <-- HERE shows in the regular expression about where the problem was
 discovered.
@@ -3676,6 +3709,11 @@ where the problem was discovered. See L<perlre>.
 <-- HERE shows in the regular expression about where the problem was
 discovered.  See L<perlre>.
 
+=item Sequence \\%s... not terminated in regex; marked by <-- HERE in m/%s/
+
+(F) The regular expression expects a mandatory argument following the escape
+sequence and this has been omitted or incorrectly written.
+
 =item Sequence (?#... not terminated in regex; marked by <-- HERE in m/%s/
 
 (F) A regular expression comment must be terminated by a closing
@@ -4438,6 +4476,10 @@ the pattern with a C<)>. Fix the pattern and retry.
 (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
+a regular expression. Fix the pattern and retry.
 
 =item Unterminated <> operator
 
@@ -4790,18 +4832,6 @@ front of your variable.
 (F) Lookbehind is allowed only for subexpressions whose length is fixed and
 known at compile time.  See L<perlre>.
 
-=item Variable length character upgraded in print
-
-(W utf8) Perl met a variable length character that is not marked with
-Unicode in the output, but the output layer (like the C<:utf8> layer) does
-not expect that. (A variable length character is defined by having
-different memory representations between the native encoding (ISO-8859-1
-or single-byte EBCDIC) and perl's Unicode encoding (UTF-8 or UTF-EBCDIC).)
-Perl assumes any strings that are not marked as Unicode to be encoded in
-the native encoding, and implicitly converts (upgrades) them into perl's
-Unicode encoding on print. If you had intended to treat them as Unicode
-strings, you might have failed to cope with them properly.
-
 =item "%s" variable %s masks earlier declaration in same %s
 
 (W misc) A "my" or "our" variable has been redeclared in the current
@@ -4867,7 +4897,7 @@ minimum version.
 =item Warning: something's wrong
 
 (W) You passed warn() an empty string (the equivalent of C<warn "">) or
-you called it with no args and C<$_> was empty.
+you called it with no args and C<$@> was empty.
 
 =item Warning: unable to close filehandle %s properly