This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
7a7799db27f1d7f8e578b6431d31e5faa3e622cb
[perl5.git] / t / porting / diag.t
1 #!/usr/bin/perl
2
3 BEGIN {
4   @INC = '..' if -f '../TestInit.pm';
5 }
6 use TestInit qw(T); # T is chdir to the top level
7
8 use warnings;
9 use strict;
10
11 require 't/test.pl';
12 plan('no_plan');
13
14 # --make-exceptions-list outputs the list of strings that don't have
15 # perldiag.pod entries to STDERR without TAP formatting, so they can
16 # easily be put in the __DATA__ section of this file.  This was done
17 # initially so as to not create new test failures upon the initial
18 # creation of this test file.  You probably shouldn't do it again.
19 # Just add the documentation instead.
20 my $make_exceptions_list = ($ARGV[0]||'') eq '--make-exceptions-list';
21
22 require 'regen/embed_lib.pl';
23
24 # Look for functions that look like they could be diagnostic ones.
25 my @functions;
26 foreach (@{(setup_embed())[0]}) {
27   next if @$_ < 2;
28   next unless $_->[2]  =~ /warn|err|(\b|_)die|croak/i;
29   # The flag p means that this function may have a 'Perl_' prefix
30   # The flag s means that this function may have a 'S_' prefix
31   push @functions, $_->[2];
32   push @functions, 'Perl_' . $_->[2] if $_->[0] =~ /p/;
33   push @functions, 'S_' . $_->[2] if $_->[0] =~ /s/;
34 };
35
36 my $regcomp_re = "(?<routine>(?:ckWARN(?:\\d+)?reg\\w*|vWARN\\d+))";
37 my $function_re = join '|', @functions;
38 my $regcomp_fail_re = '\b(?:(?:Simple_)?v)?FAIL[2-4]?\b';
39 my $source_msg_re =
40    "(?<routine>\\bDIE\\b|$function_re|$regcomp_fail_re)";
41 my $text_re = '"(?<text>(?:\\\\"|[^"]|"\s*[A-Z_]+\s*")*)"';
42 my $source_msg_call_re = qr/$source_msg_re(?:_nocontext)? \s*
43     \(aTHX_ \s*
44     (?:packWARN\d*\((?<category>.*?)\),)? \s*
45     $text_re /x;
46 my $bad_version_re = qr{BADVERSION\([^"]*$text_re};
47    $regcomp_fail_re = qr/$regcomp_fail_re\([^"]*$text_re/;
48 my $regcomp_call_re = qr/$regcomp_re.*?$text_re/;
49
50 my %entries;
51
52 # Get the ignores that are compiled into this file
53 my $reading_categorical_exceptions;
54 while (<DATA>) {
55   chomp;
56   $entries{$_}{todo} = 1;
57   $reading_categorical_exceptions and $entries{$_}{cattodo}=1;
58   /__CATEGORIES__/ and ++$reading_categorical_exceptions;
59 }
60
61 my $pod = "pod/perldiag.pod";
62 my $cur_entry;
63 open my $diagfh, "<", $pod
64   or die "Can't open $pod: $!";
65
66 my $category_re = qr/ [a-z0-9_:]+?/;    # Note: requires an initial space
67 my $severity_re = qr/ . (?: \| . )* /x; # A severity is a single char, but can
68                                         # be of the form 'S|P|W'
69 my @same_descr;
70 while (<$diagfh>) {
71   if (m/^=item (.*)/) {
72     $cur_entry = $1;
73
74     # Allow multi-line headers
75     while (<$diagfh>) {
76       if (/^\s*$/) {
77         last;
78       }
79
80       $cur_entry .= $_;
81     }
82
83     $cur_entry =~ s/\n/ /gs; # Fix multi-line headers if they have \n's
84     $cur_entry =~ s/\s+\z//;
85
86     if (exists $entries{$cur_entry} &&  $entries{$cur_entry}{todo}
87                                     && !$entries{$cur_entry}{cattodo}) {
88         TODO: {
89             local $::TODO = "Remove the TODO entry \"$cur_entry\" from DATA as it is already in $pod near line $.";
90             ok($cur_entry);
91         }
92     }
93     # Make sure to init this here, so an actual entry in perldiag
94     # overwrites one in DATA.
95     $entries{$cur_entry}{todo} = 0;
96     $entries{$cur_entry}{line_number} = $.;
97   }
98
99   next if ! defined $cur_entry;
100
101   if (! $entries{$cur_entry}{severity}) {
102     if (/^ \( ( $severity_re )
103
104         # Can have multiple categories separated by commas
105         ( $category_re (?: , $category_re)* )? \) /x)
106     {
107       $entries{$cur_entry}{severity} = $1;
108       $entries{$cur_entry}{category} =
109         $2 && join ", ", sort split " ", $2 =~ y/,//dr;
110
111       # Record it also for other messages sharing the same description
112       @$_{qw<severity category>} =
113         @{$entries{$cur_entry}}{qw<severity category>}
114        for @same_descr;
115     }
116     elsif (! $entries{$cur_entry}{first_line} && $_ =~ /\S/) {
117
118       # Keep track of first line of text if doesn't contain a severity, so
119       # that can later examine it to determine if that is ok or not
120       $entries{$cur_entry}{first_line} = $_;
121     }
122     if (/\S/) {
123       @same_descr = ();
124     }
125     else {
126       push @same_descr, $entries{$cur_entry};
127     }
128   }
129 }
130
131 foreach my $cur_entry ( keys %entries) {
132     next if $entries{$cur_entry}{todo}; # If in this file, won't have a severity
133     if (! exists $entries{$cur_entry}{severity}
134
135             # If there is no first line, it was two =items in a row, so the
136             # second one is the one with with text, not this one.
137         && exists $entries{$cur_entry}{first_line}
138
139             # If the first line refers to another message, no need for severity
140         && $entries{$cur_entry}{first_line} !~ /^See/)
141     {
142         fail($cur_entry);
143         diag(
144             "   $pod entry at line $entries{$cur_entry}{line_number}\n"
145           . "       \"$cur_entry\"\n"
146           . "   is missing a severity and/or category"
147         );
148     }
149 }
150
151 # List from perlguts.pod "Formatted Printing of IVs, UVs, and NVs"
152 # Convert from internal formats to ones that the readers will be familiar
153 # with, while removing any format modifiers, such as precision, the
154 # presence of which would just confuse the pod's explanation
155 my %specialformats = (IVdf => 'd',
156                       UVuf => 'd',
157                       UVof => 'o',
158                       UVxf => 'x',
159                       UVXf => 'X',
160                       NVef => 'f',
161                       NVff => 'f',
162                       NVgf => 'f',
163                       HEKf256=>'s',
164                       HEKf => 's',
165                       UTF8f=> 's',
166                       SVf256=>'s',
167                       SVf32=> 's',
168                       SVf  => 's');
169 my $format_modifiers = qr/ [#0\ +-]*              # optional flags
170                           (?: [1-9][0-9]* | \* )? # optional field width
171                           (?: \. \d* )?           # optional precision
172                           (?: h|l )?              # optional length modifier
173                         /x;
174
175 my $specialformats =
176  join '|', sort { length $b cmp length $a } keys %specialformats;
177 my $specialformats_re = qr/%$format_modifiers"\s*($specialformats)(\s*")?/;
178
179 open my $fh, '<', 'MANIFEST' or die "Can't open MANIFEST: $!";
180 while (my $file = <$fh>) {
181     chomp $file;
182     $file =~ s/\s+.*//;
183     next unless $file =~ /\.(?:c|cpp|h|xs|y)\z/ or $file =~ /^perly\./;
184     # OS/2 extensions have never been migrated to ext/, hence the special case:
185     next if $file =~ m!\A(?:ext|dist|cpan|lib|t|os2/OS2)/!
186             && $file !~ m!\Aext/DynaLoader/!;
187     check_file($file);
188 }
189 close $fh or die $!;
190
191 # Standardize messages with variants into the form that appears
192 # in perldiag.pod -- useful for things without a diag_listed_as annotation
193 sub standardize {
194   my ($name) = @_;
195
196   if    ( $name =~ m/^(Invalid strict version format) \([^\)]*\)/ ) {
197     $name = "$1 (\%s)";
198   }
199   elsif ( $name =~ m/^(Invalid version format) \([^\)]*\)/ ) {
200     $name = "$1 (\%s)";
201   }
202   elsif ($name =~ m/^panic: /) {
203     $name = "panic: \%s";
204   }
205
206   return $name;
207 }
208
209 sub check_file {
210   my ($codefn) = @_;
211
212   print "# Checking $codefn\n";
213
214   open my $codefh, "<", $codefn
215     or die "Can't open $codefn: $!";
216
217   my $listed_as;
218   my $listed_as_line;
219   my $sub = 'top of file';
220   while (<$codefh>) {
221     chomp;
222     # Getting too much here isn't a problem; we only use this to skip
223     # errors inside of XS modules, which should get documented in the
224     # docs for the module.
225     if (m<^[^#\s]> and $_ !~ m/^[{}]*$/) {
226       $sub = $_;
227     }
228     next if $sub =~ m/^XS/;
229     if (m</\*\s*diag_listed_as: (.*?)\s*\*/>) {
230       $listed_as = $1;
231       $listed_as_line = $.+1;
232     }
233     next if /^#/;
234
235     my $multiline = 0;
236     # Loop to accumulate the message text all on one line.
237     if (m/(?:$source_msg_re(?:_nocontext)?|$regcomp_re)\s*\(/) {
238       while (not m/\);$/) {
239         my $nextline = <$codefh>;
240         # Means we fell off the end of the file.  Not terribly surprising;
241         # this code tries to merge a lot of things that aren't regular C
242         # code (preprocessor stuff, long comments).  That's OK; we don't
243         # need those anyway.
244         last if not defined $nextline;
245         chomp $nextline;
246         $nextline =~ s/^\s+//;
247         $_ =~ s/\\$//;
248         # Note that we only want to do this where *both* are true.
249         if ($_ =~ m/"\s*$/ and $nextline =~ m/^"/) {
250           $_ =~ s/"\s*$//;
251           $nextline =~ s/^"//;
252         }
253         $_ .= $nextline;
254         ++$multiline;
255       }
256     }
257     # This should happen *after* unwrapping, or we don't reformat the things
258     # in later lines.
259
260     s/$specialformats_re/"%$specialformats{$1}" .  (defined $2 ? '' : '"')/ge;
261
262     # Remove any remaining format modifiers, but not in %%
263     s/ (?<!%) % $format_modifiers ( [dioxXucsfeEgGp] ) /%$1/xg;
264
265     # The %"foo" thing needs to happen *before* this regex.
266     # diag($_);
267     # DIE is just return Perl_die
268     my ($name, $category, $routine);
269     if (/$source_msg_call_re/) {
270       ($name, $category, $routine) = ($+{'text'}, $+{'category'}, $+{'routine'});
271       # Sometimes the regexp will pick up too much for the category
272       # e.g., WARN_UNINITIALIZED), PL_warn_uninit_sv ... up to the next )
273       $category && $category =~ s/\).*//s;
274     }
275     elsif (/$bad_version_re/) {
276       ($name, $category) = ($+{'text'}, undef);
277     }
278     elsif (/$regcomp_fail_re/) {
279       #  FAIL("foo") -> "foo in regex m/%s/"
280       # vFAIL("foo") -> "foo in regex; marked by <-- HERE in m/%s/"
281       ($name, $category) = ($+{'text'}, undef);
282       $name .=
283         " in regex" . ("; marked by <-- HERE in" x /vFAIL/) . " m/%s/";
284     }
285     elsif (/$regcomp_call_re/) {
286       # vWARN/ckWARNreg("foo") -> "foo in regex; marked by <-- HERE in m/%s/
287       ($name, $category, $routine) = ($+{'text'}, undef, $+{'routine'});
288       $name .= " in regex; marked by <-- HERE in m/%s/";
289       $category = 'WARN_REGEXP';
290       if ($routine =~ /dep/) {
291         $category .= ',WARN_DEPRECATED';
292       }
293     }
294     else {
295       next;
296     }
297
298     # Try to guess what the severity should be.  In the case of
299     # Perl_ck_warner and other _ck_ functions, we can tell whether it is
300     # a severe/default warning or no by the _d suffix.  In the case of
301     # other warn functions we cannot tell, because Perl_warner may be pre-
302     # ceded by if(ckWARN) or if(ckWARN_d).
303     my $severity = !$routine                   ? '[PFX]'
304                  :  $routine =~ /warn.*_d\z/   ? '[DS]'
305                  :  $routine =~ /ck_warn/      ?  'W'
306                  :  $routine =~ /warner/       ? '[WDS]'
307                  :  $routine =~ /warn/         ?  'S'
308                  :  $routine =~ /ckWARN.*dep/  ?  'D'
309                  :  $routine =~ /ckWARN\d*reg/ ?  'W'
310                  :  $routine =~ /vWARN\d/      ? '[WDS]'
311                  :                             '[PFX]';
312     my $categories;
313     if (defined $category) {
314       $category =~ s/__/::/g;
315       $categories =
316         join ", ",
317               sort map {s/^WARN_//; lc $_} split /\s*[|,]\s*/, $category;
318     }
319     if ($listed_as and $listed_as_line == $. - $multiline) {
320       $name = $listed_as;
321     } else {
322       # The form listed in perldiag ignores most sorts of fancy printf
323       # formatting, or makes it more perlish.
324       $name =~ s/%%/%/g;
325       $name =~ s/%l[ud]/%d/g;
326       $name =~ s/%\.(\d+|\*)s/\%s/g;
327       $name =~ s/(?:%s){2,}/%s/g;
328       $name =~ s/(\\")|("\s*[A-Z_]+\s*")/$1 ? '"' : '%s'/egg;
329       $name =~ s/\\t/\t/g;
330       $name =~ s/\\n/\n/g;
331       $name =~ s/\s+$//;
332       $name =~ s/(\\)\\/$1/g;
333     }
334
335     # Extra explanatory info on an already-listed error, doesn't
336     # need it's own listing.
337     next if $name =~ m/^\t/;
338
339     # Happens fairly often with PL_no_modify.
340     next if $name eq '%s';
341
342     # Special syntax for magic comment, allows ignoring the fact
343     # that it isn't listed.  Only use in very special circumstances,
344     # like this script failing to notice that the Perl_croak call is
345     # inside an #if 0 block.
346     next if $name eq 'SKIPME';
347
348     next if $name=~/\[TESTING\]/; # ignore these as they are works in progress
349
350     check_message(standardize($name),$codefn,$severity,$categories);
351   }
352 }
353
354 sub check_message {
355     my($name,$codefn,$severity,$categories,$partial) = @_;
356     my $key = $name =~ y/\n/ /r;
357     my $ret;
358
359     # Try to reduce printf() formats to simplest forms
360     # Really this should be matching %s, etc like diagnostics.pm does
361
362     # Kill flags
363     $key =~ s/%[#0\-+]/%/g;
364
365     # Kill width
366     $key =~ s/\%(\d+|\*)/%/g;
367
368     # Kill precision
369     $key =~ s/\%\.(\d+|\*)/%/g;
370
371     if (exists $entries{$key} and
372           # todo + cattodo means it is not found and it is not in the
373           # regular todo list, either
374           !$entries{$key}{todo} || !$entries{$key}{cattodo}) {
375       $ret = 1;
376       if ( $entries{$key}{seen}++ ) {
377         # no need to repeat entries we've tested
378       } elsif ($entries{$key}{todo}) {
379         TODO: {
380           no warnings 'once';
381           local $::TODO = 'in DATA';
382           # There is no listing, but it is in the list of exceptions.  TODO FAIL.
383           fail($key);
384           diag(
385             "    Message '$name'\n    from $codefn line $. is not listed in $pod\n".
386             "    (but it wasn't documented in 5.10 either, so marking it TODO)."
387           );
388         }
389       } else {
390         # We found an actual valid entry in perldiag.pod for this error.
391         pass($key);
392
393         return $ret
394           if $entries{$key}{cattodo};
395
396         # Now check the category and severity
397
398         # Cache our severity qr thingies
399         use feature 'state';
400         state %qrs;
401         my $qr = $qrs{$severity} ||= qr/$severity/;
402
403         like($entries{$key}{severity}, $qr,
404           $severity =~ /\[/
405             ? "severity is one of $severity for $key"
406             : "severity is $severity for $key");
407
408         is($entries{$key}{category}, $categories,
409            ($categories ? "categories are [$categories]" : "no category")
410              . " for $key");
411       }
412     } elsif ($partial) {
413       # noop
414     } else {
415       my $ok;
416       if ($name =~ /\n/) {
417         $ok = 1;
418         check_message($_,$codefn,$severity,$categories,1) or $ok = 0, last
419           for split /\n/, $name;
420       }
421       if ($ok) {
422         # noop
423       } elsif ($make_exceptions_list) {
424         # We're making an updated version of the exception list, to
425         # stick in the __DATA__ section.  I honestly can't think of
426         # a situation where this is the right thing to do, but I'm
427         # leaving it here, just in case one of my descendents thinks
428         # it's a good idea.
429         print STDERR "$key\n";
430       } else {
431         # No listing found, and no excuse either.
432         # Find the correct place in perldiag.pod, and add a stanza beginning =item $name.
433         fail($name);
434         diag("    Message '$name'\n    from $codefn line $. is not listed in $pod");
435       }
436       # seen it, so only fail once for this message
437       $entries{$name}{seen}++;
438     }
439
440     die if $name =~ /%$/;
441     return $ret;
442 }
443
444 # Lists all missing things as of the inauguration of this script, so we
445 # don't have to go from "meh" to perfect all at once.
446
447 # PLEASE DO NOT ADD TO THIS LIST.  Instead, write an entry in
448 # pod/perldiag.pod for your new (warning|error).  Nevertheless,
449 # listing exceptions here when this script is not smart enough
450 # to recognize the messages is not so bad, as long as there are
451 # entries in perldiag.
452
453 # Entries after __CATEGORIES__ are those that are in perldiag but fail the
454 # severity/category test.
455
456 # Also FIXME this test, as the first entry in TODO *is* covered by the
457 # description: Malformed UTF-8 character (%s)
458 __DATA__
459 Malformed UTF-8 character (unexpected non-continuation byte 0x%x, immediately after start byte 0x%x)
460
461 Cannot apply "%s" in non-PerlIO perl
462 Can't find string terminator %c%s%c anywhere before EOF
463 Can't fix broken locale name "%s"
464 Can't get short module name from a handle
465 Can't locate object method "%s" via package "%s" (perhaps you forgot to load "%s"?)
466 Can't pipe "%s": %s
467 Can't spawn: %s
468 Can't spawn "%s": %s
469 Can't %s script `%s' with ARGV[0] being `%s'
470 Can't %s "%s": %s
471 Can't %s `%s' with ARGV[0] being `%s' (looking for executables only, not found)
472 Can't use string ("%s"%s) as a subroutine ref while "strict refs" in use
473 \%c better written as $%c
474 Character(s) in '%c' format wrapped in %s
475 chown not implemented!
476 clear %s
477 Code missing after '/' in pack
478 Code missing after '/' in unpack
479 '%c' outside of string in pack
480 Debug leaking scalars child failed%s with errno %d: %s
481 '/' does not take a repeat count in %s
482 -Dp not implemented on this platform
483 Error reading "%s": %s
484 execl not implemented!
485 EVAL without pos change exceeded limit in regex
486 Filehandle opened only for %sput
487 Filehandle %s opened only for %sput
488 Filehandle STD%s reopened as %s only for input
489 filter_del can only delete in reverse order (currently)
490 YOU HAVEN'T DISABLED SET-ID SCRIPTS IN THE KERNEL YET! FIX YOUR KERNEL, PUT A C WRAPPER AROUND THIS SCRIPT, OR USE -u AND UNDUMP!
491 free %s
492 get %s %p %p %p
493 getpwnam returned invalid UIC %o for user "%s"
494 glob failed (can't start child: %s)
495 glob failed (child exited with status %d%s)
496 Goto undefined subroutine
497 Goto undefined subroutine &%s
498 Got signal %d
499 ()-group starts with a count in %s
500 Illegal binary digit '%c' ignored
501 Illegal character %sin prototype for %s : %s
502 Illegal hexadecimal digit '%c' ignored
503 Illegal octal digit '%c' ignored
504 Invalid argument to sv_cat_decode
505 Invalid range "%c-%c" in transliteration operator
506 Invalid separator character %c%c%c in PerlIO layer specification %s
507 Invalid TOKEN object ignored
508 Invalid type '%c' in pack
509 Invalid type '%c' in %s
510 Invalid type '%c' in unpack
511 Invalid type ',' in %s
512 ioctlsocket not implemented!
513 killpg not implemented!
514 List form of pipe open not implemented
515 Malformed integer in [] in %s
516 Malformed UTF-8 character (fatal)
517 Missing (suid) fd script name
518 More than one argument to open
519 More than one argument to open(,':%s')
520 \N{} in character class restricted to one character in regex; marked by <-- HERE in m/%s/
521 No %s allowed while running setgid
522 No %s allowed with (suid) fdscript
523 Not an XSUB reference
524 Operator or semicolon missing before %c%s
525 Perl %s required--this is only %s, stopped
526 PerlApp::TextQuery: no arguments, please
527 POSIX syntax [%c %c] is reserved for future extensions in regex; marked by <-- HERE in m/%s/
528 ptr wrong %p != %p fl=%x nl=%p e=%p for %d
529 Recompile perl with -DDEBUGGING to use -D switch (did you mean -d ?)
530 Regexp modifier "%c" may appear a maximum of twice in regex; marked by <-- HERE in m/%s/
531 Regexp modifier "%c" may not appear twice in regex; marked by <-- HERE in m/%s/
532 Regexp modifiers "%c" and "%c" are mutually exclusive in regex; marked by <-- HERE in m/%s/
533 Regexp *+ operand could be empty in regex; marked by <-- HERE in m/%s/
534 Repeated format line will never terminate (~~ and @#)
535 Reversed %c= operator
536 %s(%f) failed
537 %sCompilation failed in require
538 Sequence (?%c...) not implemented in regex; marked by <-- HERE in m/%s/
539 Sequence (%s...) not recognized in regex; marked by <-- HERE in m/%s/
540 Sequence %s... not terminated in regex; marked by <-- HERE in m/%s/
541 Sequence (?%c... not terminated in regex; marked by <-- HERE in m/%s/
542 Sequence (?(%c... not terminated in regex; marked by <-- HERE in m/%s/
543 Sequence (?R) not terminated in regex m/%s/
544 set %s %p %p %p
545 %s free() ignored (RMAGIC, PERL_CORE)
546 %s has too many errors.
547 SIG%s handler "%s" not defined.
548 %s in %s
549 Size magic not implemented
550 %s number > %s non-portable
551 %srealloc() %signored
552 %s in regex m/%s/
553 %s on %s %s
554 socketpair not implemented!
555 Starting Full Screen process with flag=%d, mytype=%d
556 Starting PM process with flag=%d, mytype=%d
557 sv_2iv assumed (U_V(fabs((double)SvNVX(sv))) < (UV)IV_MAX) but SvNVX(sv)=%f U_V is 0x%x, IV_MAX is 0x%x
558 SWASHNEW didn't return an HV ref
559 switching effective gid is not implemented
560 switching effective uid is not implemented
561 System V IPC is not implemented on this machine
562 -T and -B not implemented on filehandles
563 Terminating on signal SIG%s(%d)
564 The crypt() function is not implemented on NetWare
565 The flock() function is not implemented on NetWare
566 The rewinddir() function is not implemented on NetWare
567 The seekdir() function is not implemented on NetWare
568 The telldir() function is not implemented on NetWare
569 Too deeply nested ()-groups in %s
570 Too many args on %s line of "%s"
571 U0 mode on a byte string
572 unable to find VMSPIPE.COM for i/o piping
573 Unknown Unicode option value %d
574 Unrecognized character %s; marked by <-- HERE after %s<-- HERE near column %d
575 Unstable directory path, current directory changed unexpectedly
576 Unterminated compressed integer in unpack
577 Usage: %s::%s(%s)
578 Usage: File::Copy::rmscopy(from,to[,date_flag])
579 Usage: VMS::Filespec::candelete(spec)
580 Usage: VMS::Filespec::fileify(spec)
581 Usage: VMS::Filespec::pathify(spec)
582 Usage: VMS::Filespec::rmsexpand(spec[,defspec])
583 Usage: VMS::Filespec::unixify(spec)
584 Usage: VMS::Filespec::unixpath(spec)
585 Usage: VMS::Filespec::unixrealpath(spec)
586 Usage: VMS::Filespec::vmsify(spec)
587 Usage: VMS::Filespec::vmspath(spec)
588 Usage: VMS::Filespec::vmsrealpath(spec)
589 Use of inherited AUTOLOAD for non-method %s::%s() is deprecated
590 utf8 "\x%X" does not map to Unicode
591 Value of logical "%s" too long. Truncating to %i bytes
592 waitpid: process %x is not a child of process %x
593 Wide character
594 Wide character in $/
595 Within []-length '*' not allowed in %s
596 Within []-length '%c' not allowed in %s
597 Wrong syntax (suid) fd script name "%s"
598 'X' outside of string in %s
599 'X' outside of string in unpack
600 Zero length \N{} in regex; marked by <-- HERE in m/%s/
601
602 __CATEGORIES__
603 Code point 0x%X is not Unicode, all \p{} matches fail; all \P{} matches succeed
604 Code point 0x%X is not Unicode, may not be portable
605 Illegal character \%o (carriage return)
606 Missing argument in %s
607 Unicode non-character U+%X is illegal for open interchange
608 Operation "%s" returns its argument for non-Unicode code point 0x%X
609 Operation "%s" returns its argument for UTF-16 surrogate U+%X
610 Unicode surrogate U+%X is illegal in UTF-8
611 UTF-16 surrogate U+%X
612 False [] range "%s" in regex; marked by <-- HERE in m/%s/