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