bin/faqpods

filter: Statementstmt 80.9% 17 / 21 Branchbran 42.8% 6 / 14 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 68.4% 26 / 38 CC 1 SCAR 0.0
CC
1
Cov
66%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« bin/pmvers ↑ Summary bin/pmpath »
1 #!/usr/bin/env perl
2 # faqpods - print out the paths to the faqs
3 #
4 # this is a perl program not a shell script
5 # so that we can use the correct perl
6  
7 # ------ pragmas
8 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 1 ▶use Config;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 our $VERSION = '2.2.0';
14  
15 1 my $foundcore = 0;
16 1 ▶open(PROG, "$^X -S basepods |") || die "can't fork: $!";
Branch: 1 branch
BranchTrueFalseTotal
open PROG, "$^X -S basepods |" or die "can't fork: $!" 1 0 1
17 1 ▶while (<PROG>) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined($_ = readline PROG)) 229 1 230
18 229 ▶ if (/perlfaq/) {
Branch: 1 branch
BranchTrueFalseTotal
if (/perlfaq/) 10 219 229
19 10 print $_;
20 10 $foundcore = 1;
21 }
22 }
23  
24 1 ▶unless ($foundcore) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($foundcore) 0 1 1
25 0 my $lib = $Config{'vendorlib'};
26 0 ▶ opendir(LIB, $lib) || die "$0: can't opendir $lib: $!\n";
Branch: 1 branch
BranchTrueFalseTotal
opendir LIB, $lib or die "$0: can't opendir ${lib}: $!\n" 0 0 0
27 0 ▶ while ($_ = readdir(LIB)) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined($_ = readdir LIB)) 0 0 0
28 0 ▶ print "$lib/$_\n" if /perlfaq.*\.pod$/;
Branch: 1 branch
BranchTrueFalseTotal
if /perlfaq.*\.pod$/ 0 0 0
29 }
30 }
31  
32 __END__
« bin/pmvers ↑ Summary bin/pmpath »