bin/pmcheck

filter: Statementstmt 60.8% 14 / 23 Branchbran 50.0% 3 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 61.2% 19 / 31 CC 1 SCAR 0.0
CC
1
Cov
59%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« /usr/local/bin/pod2text ↑ Summary bin/pmvers »
1 #!/usr/bin/env perl
2 # pmcheck -- check that Perl is set up correctly for Perl modules
3  
4 # ------ pragmas
5 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 our $VERSION = '2.0.0';
9  
10 # ------ define variables
11 1 my $dir = undef; # directory in @INC
12 1 my $errors = 0; # count of errors found
13  
14 1 for $dir (@INC) {
15 8 ▶ if (!-e $dir) {
Branch: 1 branch
BranchTrueFalseTotal
unless (-e $dir) 0 8 8
16 0 print "'$dir' is in \@INC but does not exist\n";
17 0 $errors++;
18 0 next;
19 }
20  
21 8 ▶ if (!-d $dir) {
Branch: 1 branch
BranchTrueFalseTotal
unless (-d $dir) 0 8 8
22 0 print "'$dir' is in \@INC but is not a directory\n";
23 0 $errors++;
24 0 next;
25 }
26  
27 8 ▶ if (!-r $dir) {
Branch: 1 branch
BranchTrueFalseTotal
unless (-r $dir) 0 8 8
28 0 print "'$dir' is in \@INC but you cannot read it\n";
29 0 $errors++;
30 0 next;
31 }
32 }
33  
34 1 exit($errors != 0);
35  
36 __END__
« /usr/local/bin/pod2text ↑ Summary bin/pmvers »