check_prereqs.pl untested

filter: Statementstmt 0.0% 0 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 35 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use Mojo::File qw/path/;
2 use Mojo::Util qw/dumper tablify/;
3 use Module::CoreList;
4 use strict;
5  
6 $\ = "\n"; $, = "\t";
7  
8 my $use;
9  
10 for my $dir (qw/t lib/) {
11 path($dir)->list_tree
12 ->grep(qr/\.pm$|\.pl$|\.t$/)
13 ->each(sub {
14 my $f = shift;
15 push $use->{$_}->@*, $f->to_string for map { /use ([\w:]+)/; $1 } grep { /use ([\S:]+)/ } split /\n/, $f->slurp;
16 });
17 }
18  
19  
20 print dumper $use;
21  
22 print tablify [ map { [$_, Module::CoreList->first_release($_) ] } keys $use->%* ];
23  
24 print for map { sprintf "%s = 0", $_ } sort grep { !Module::CoreList->first_release($_) } keys $use->%*;