in reply to A list of warnings by category?
update: Ignore me for now, got confused after hitting preview.
This list should be compiled from perl sources when you compile perl, and here's how it might be done (UNtested,just slapped it together):
use File::Find; use vars '%CatWarnOne'; find(\&finder, 'path/to/perl/sources' ); for my $k ( sort keys %CatWarnOne ){ print "\t$k\n"; for my $ke ( sort keys %{$CatWarnOne{$k}} ){ print "\t\t$k\n"; } } exit; sub finder { return if -d $File::Find::Name; return unless /\.(c|xs)$/; open IN, $File::Find::Name or warn "ERROR: Couldn't open $File::Find::name : $!" && return; while(<IN>){ if( /Perl_warner\(/ ){ my($key, @val); while( not( $key and @val ) ){ ( $key, @val ) = /Perl_warner\(.*?packWARN\((\w+)\)[^" +]+? (?:"((?:[^"]|\\")+?)"[^";]*?)+\);/x; $_ .= <IN> if not( $key and @val ); } $CatWarnOne{$key}{$_}=1 for @val; } } close IN; return; }
final update: I hadn't noticed that perldiag had entries like (W bareword), but I haven't read perldiag in forever, oh well :)
|
|---|