| 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
| |||||||||||
| 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
| |||||||||||
| 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
| |||||||||||
| 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__ | ||||||||||