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