with a file checks if it has a maintainer
with a dir checks all files have a maintainer
otherwise checks for multiple maintainers
+--checkmani like --check, but only reports on unclaimed files if they
+ are in MANIFEST
--opened list all modules of modified files
Matching is case-ignoring regexp, author matching is both by
the short id and by the full name and email. A "module" may
my $Module;
my $Files;
my $Check;
+my $Checkmani;
my $Opened;
sub process_options {
'module=s' => \$Module,
'files' => \$Files,
'check' => \$Check,
+ 'checkmani' => \$Checkmani,
'opened' => \$Opened,
);
}
}
}
- } elsif ($Check) {
+ } elsif ($Check or $Checkmani) {
if( @Files ) {
- missing_maintainers( qr{\.(?:[chty]|p[lm]|xs)\z}msx, @Files)
+ missing_maintainers(
+ $Checkmani
+ ? sub { -f $_ and exists $MANIFEST{$File::Find::name} }
+ : sub { /\.(?:[chty]|p[lm]|xs)\z/msx },
+ @Files
+ );
}
else {
duplicated_maintainers();
for my $d (@path) {
if( -d $d ) { push @dir, $d } else { warn_maintainer($d) }
}
- find sub { warn_maintainer($File::Find::name) if /$check/; }, @dir
+ find sub { warn_maintainer($File::Find::name) if $check->() }, @dir
if @dir;
}