scripts/apc-overview

filter: Statementstmt 66.6% 22 / 33 Branchbran 50.0% 4 / 8 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 56.3% 31 / 55 CC 1 SCAR 0.0
CC
1
Cov
55%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« scripts/buildaperl ↑ Summary
1 #!/usr/bin/perl -w
2  
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use Perl::Repository::APC 1.029;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 my $Id = q$Id: apc-overview.pl 32 2003-01-26 07:16:55Z k $;
8  
9 3 ▶use Getopt::Long;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 our %Opt;
11 3 ▶GetOptions(\%Opt, qw(
Branch: 1 branch
BranchTrueFalseTotal
&GetOptions(\%main::Opt, ("h!", "version!", "wide!")) or die Usage() 3 0 3
12 h!
13 version!
14 wide!
15 )) or die Usage();
16 3 ▶if ($Opt{h}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($main::Opt{"h"}) 2 1 3
17 2 print Usage();
18 2 exit;
19 }
20 1 ▶if ($Opt{version}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($main::Opt{"version"}) 1 0 1
21 1 print $Id, "\n";
22 1 exit;
23 }
24  
25 0 ▶my $APC = shift || "APC";
Condition0%0/2
shift @ARGV || 'APC'
l!l
00
MC/DC0%0/1
shift @ARGV || 'APC'
shift @ARGV
Truth table0%0/2
A
A= shift @ARGV
Aresult
11
00
26 0 my $apc = Perl::Repository::APC->new($APC);
27 0 printf "%-22s %11s %5s %6s (%s)\n", qw(Branch Perl-Version 1st last patchcount);
28 0 for my $apcdir ($apc->apcdirs) {
29 0 ▶ if ($Opt{wide}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($main::Opt{'wide'}) { } 0 0 0
30 printf("%-24s %10s %6d %6d (%4d) %-15s %s\n",
31 0 @{$apcdir}{"branch","perl"},
32 $apcdir->{patches}[0],
33 $apcdir->{patches}[-1],
34 0 ▶ scalar @{$apcdir->{patches}},
Condition0%0/4
$apcdir->{'dir'} || ''
l!l
00
$apcdir->{'diffdir'} || ''
l!l
00
MC/DC0%0/1
$apcdir->{'dir'} || ''
$apcdir->{'dir'}
MC/DC0%0/1
$apcdir->{'diffdir'} || ''
$apcdir->{'diffdir'}
Truth table0%0/2
A
A= $apcdir->{'dir'}
Aresult
11
00
Truth table0%0/2
A
A= $apcdir->{'diffdir'}
Aresult
11
00
35 $apcdir->{dir} || "",
36 0 $apcdir->{diffdir} || "",
37 );
38 } else {
39 printf("%-24s %10s %6d %6d (%4d)\n",
40 0 @{$apcdir}{"branch","perl"},
41 $apcdir->{patches}[0],
42 $apcdir->{patches}[-1],
43 0 scalar @{$apcdir->{patches}},
44 );
45 }
46 }
47  
48 2 ▶sub Usage {
Subroutine Usage: called CC=1 SCAR=0.0
49 2 return <<USAGE;
50 Usage:
51 $0 [apc-directory] # show one line info per directory
52 -- or --
53 $0 options
54 Available options:
55 --h # this help message
56 --version # print version and exit
57  
58 apc-directory defaults to "APC"
59 USAGE
60 }
« scripts/buildaperl ↑ Summary