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