util/ppixref

filter: Statementstmt 53.7% 100 / 186 Branchbran 40.7% 31 / 76 Conditioncond 33.3% 11 / 33 MC/DCmcdc 0.0% 0 / 16 Subroutinesub 56.2% 18 / 32 Podpod n/a totaltotal 46.6% 160 / 343 CC 25 SCAR 16.0
CC
25
Cov
48%
__ANON__
13.3
emit
9.2
__ANON__
6.0
CRAP 4.9
« blib/lib/PPI/Xref.pm ↑ Summary
1 #!/usr/bin/env perl
2  
3 1 ▶use PPI::Xref;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
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 ▶use File::Basename qw[basename];
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 my $ME = basename($0);
10  
11 1 ▶use Getopt::Long;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 Getopt::Long::Configure(qw[no_auto_abbrev]);
13  
14 1 ▶use PPI::Xref::Help;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 sub short_help {
17 0 ▶ PPI::Xref::Help::short_help($ME, *DATA);
Subroutine short_help: not called CC=1 SCAR=6.9
18 }
19  
20 sub long_help {
21 0 ▶ PPI::Xref::Help::long_help($ME, *DATA);
Subroutine long_help: not called CC=1 SCAR=6.9
22 }
23  
24 sub man_help {
25 0 ▶ PPI::Xref::Help::man_help($ME, *DATA);
Subroutine man_help: not called CC=1 SCAR=6.9
26 }
27  
28 1 my %OptDefault = (
29 separator => "\t",
30 recurse => 1,
31 report_title => 1,
32 missing_modules => 1,
33 parse_errors => 1,
34 auto_semicolon => 1,
35 );
36  
37 1 my %Opt = %OptDefault;
38  
39 short_help()
40 unless GetOptions('files' => \$Opt{files},
41 'subs' => \$Opt{subs},
42 'packages' => \$Opt{packages},
43 'modules' => \$Opt{modules},
44 'missing_modules' => \$Opt{missing_modules},
45 'parse_errors' => \$Opt{parse_errors},
46 'total_lines' => \$Opt{total_lines},
47 'files_lines' => \$Opt{files_lines},
48 'subs_files' => \$Opt{subs_files},
49 'packages_files' => \$Opt{packages_files},
50 'incs_files' => \$Opt{incs_files},
51 'incs_chains' => \$Opt{incs_chains},
52 'incs_chains_reverse' => \$Opt{incs_chains_reverse},
53 'files_counts' => \$Opt{files_counts},
54 'modules_counts' => \$Opt{modules_counts},
55 'incs_deps' => \$Opt{incs_deps},
56 'parse' => \$Opt{parse},
57 'report_all' => \$Opt{report_all},
58 'report_prefix=s' => \$Opt{report_prefix},
59 'INC=s' => \$Opt{INC},
60 'cache_directory=s' => \$Opt{cache_directory},
61 'code=s' => \$Opt{code},
62 'auto_semicolon' => \$Opt{auto_semicolon},
63 'files_from_file=s' => \$Opt{files_from_file},
64 'files_from_cache' => \$Opt{files_from_cache},
65 'files_from_system' => \$Opt{files_from_system},
66 'cache_read_only' => \$Opt{cache_read_only},
67 'process_verbose' => \$Opt{process_verbose},
68 'recurse_verbose' => \$Opt{recurse_verbose},
69 'cache_verbose' => \$Opt{cache_verbose},
70 'summary' => \$Opt{summary},
71 'separator=s' => \$Opt{separator},
72 'recurse!' => \$Opt{recurse},
73 'column' => \$Opt{column},
74 'finish' => \$Opt{finish},
75 'help' => \$Opt{short_help},
76 'short_help' => \$Opt{short_help},
77 'long_help' => \$Opt{long_help},
78 'man' => \$Opt{man_help},
79 1 ▶ );
Branch: 1 branch
BranchTrueFalseTotal
unless &GetOptions("files", \$Opt{"files"}, "subs", \$Opt{"subs"}, "packages", \$Opt{"packages"}, "modules", \$Opt{"modules"}, "missing_modules", \$Opt{"missing_modules"}, "parse_errors", \$Opt{"parse_errors"}, "total_lines", \$Opt{"total_lines"}, "files_lines", \$Opt{"files_lines"}, "subs_files", \$Opt{"subs_files"}, "packages_files", \$Opt{"packages_files"}, "incs_files", \$Opt{"incs_files"}, "incs_chains", \$Opt{"incs_chains"}, "incs_chains_reverse", \$Opt{"incs_chains_reverse"}, "files_counts", \$Opt{"files_counts"}, "modules_counts", \$Opt{"modules_counts"}, "incs_deps", \$Opt{"incs_deps"}, "parse", \$Opt{"parse"}, "report_all", \$Opt{"report_all"}, "report_prefix=s", \$Opt{"report_prefix"}, "INC=s", \$Opt{"INC"}, "cache_directory=s", \$Opt{"cache_directory"}, "code=s", \$Opt{"code"}, "auto_semicolon", \$Opt{"auto_semicolon"}, "files_from_file=s", \$Opt{"files_from_file"}, "files_from_cache", \$Opt{"files_from_cache"}, "files_from_system", \$Opt{"files_from_system"}, "cache_read_only", \$Opt{"cache_read_only"}, "process_verbose", \$Opt{"process_verbose"}, "recurse_verbose", \$Opt{"recurse_verbose"}, "cache_verbose", \$Opt{"cache_verbose"}, "summary", \$Opt{"summary"}, "separator=s", \$Opt{"separator"}, "recurse!", \$Opt{"recurse"}, "column", \$Opt{"column"}, "finish", \$Opt{"finish"}, "help", \$Opt{"short_help"}, "short_help", \$Opt{"short_help"}, "long_help", \$Opt{"long_help"}, "man", \$Opt{"man_help"}) 0 1 1
80  
81 1 ▶short_help() if $Opt{short_help};
Branch: 1 branch
BranchTrueFalseTotal
if $Opt{"short_help"} 0 1 1
82 1 ▶long_help() if $Opt{long_help};
Branch: 1 branch
BranchTrueFalseTotal
if $Opt{"long_help"} 0 1 1
83 1 ▶man_help() if $Opt{man_help};
Branch: 1 branch
BranchTrueFalseTotal
if $Opt{"man_help"} 0 1 1
84  
85 1 my @ACTION = qw[files subs packages modules missing_modules parse_errors
86 subs_files packages_files files_lines total_lines
87 files_counts modules_counts
88 incs_files incs_deps incs_chains incs_chains_reverse];
89
90 1 ▶if ($Opt{report_all}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Opt{"report_all"}) 0 1 1
91 0 @Opt{@ACTION} = (1) x @ACTION;
92 }
93  
94 1 ▶use List::Util qw[any];
Subroutine BEGIN: called CC=1 SCAR=0.0
95 1 ▶short_help() unless (any { $Opt{$_} }
Subroutine __ANON__: called CC=1 SCAR=0.0
96 16 grep { ! $OptDefault{$_} }
97 @ACTION) ||
98 1 ▶ $Opt{parse};
Branch: 1 branch
BranchTrueFalseTotal
unless &any(sub { $Opt{$_}; } , grep({not $OptDefault{$_};} @ACTION)) or $Opt{"parse"} 0 1 1
Condition33%1/3
&any(sub { $Opt{$_}; } , grep({not $OptDefault{$_};} @ACTION)) or $Opt{"parse"}
l!l&&r!l&&!r
100
MC/DC0%0/2
&any(sub { $Opt{$_}; } , grep({not $OptDefault{$_};} @ACTION)) or $Opt{"parse"}
&any(sub { $Opt{$_}; } , grep({not $OptDefault{$_};} @ACTION)) $Opt{"parse"}
Truth table33%1/3
A or B
A= &any(sub { $Opt{$_}; } , grep({not $OptDefault{$_};} @ACTION))B= $Opt{"parse"}
ABresult
1X1
011
000
99  
100 1 ▶$Opt{separator} = "\t" if $Opt{separator} eq '\t'; # Nicer to type in shells.
Branch: 1 branch
BranchTrueFalseTotal
if $Opt{"separator"} eq "\\t" 0 1 1
101  
102 1 ▶if ($Opt{process_verbose} ||
Branch: 1 branch
BranchTrueFalseTotal
if ($Opt{"process_verbose"} or $Opt{"recurse_verbose"} or $Opt{"cache_verbose"} or $Opt{"summary"}) 0 1 1
Condition33%3/9
$Opt{"process_verbose"} or $Opt{"recurse_verbose"} or $Opt{"cache_verbose"} or $Opt{"summary"}
l!l&&r!l&&!r
001
$Opt{"process_verbose"} or $Opt{"recurse_verbose"} or $Opt{"cache_verbose"}
l!l&&r!l&&!r
001
$Opt{"process_verbose"} or $Opt{"recurse_verbose"}
l!l&&r!l&&!r
001
MC/DC0%0/4
$Opt{"process_verbose"} or $Opt{"recurse_verbose"} or $Opt{"cache_verbose"} or $Opt{"summary"}
$Opt{"process_verbose"} $Opt{"recurse_verbose"} $Opt{"cache_verbose"} $Opt{"summary"}
Truth table0%0/5
A or B or C or D
A= $Opt{"process_verbose"}B= $Opt{"recurse_verbose"}C= $Opt{"cache_verbose"}D= $Opt{"summary"}
ABCDresult
1XXX1
01XX1
001X1
00011
00000
103 $Opt{recurse_verbose} ||
104 $Opt{cache_verbose} ||
105 $Opt{summary}) {
106 0 select(STDOUT); $| = 1;
107 }
108  
109 my $xref_opt = {
110 process_verbose => $Opt{process_verbose},
111 recurse_verbose => $Opt{recurse_verbose},
112 cache_verbose => $Opt{cache_verbose},
113 cache_read_only => $Opt{cache_read_only},
114 recurse => $Opt{recurse},
115 1 };
116  
117 1 ▶if (defined $Opt{INC}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $Opt{"INC"}) 0 1 1
118 0 $xref_opt->{INC} = [ split(',', $Opt{INC}) ];
119 }
120  
121 1 ▶if (defined $Opt{cache_directory}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $Opt{"cache_directory"}) 0 1 1
122 0 ▶ unless (-d $Opt{cache_directory} && -r $Opt{cache_directory} && -w $Opt{cache_directory}) {
Branch: 1 branch
BranchTrueFalseTotal
unless (-d $Opt{"cache_directory"} and -r $Opt{"cache_directory"} and -w $Opt{"cache_directory"}) 0 0 0
Condition0%0/6
-d $Opt{"cache_directory"} and -r $Opt{"cache_directory"} and -w $Opt{"cache_directory"}
!ll&&!rl&&r
000
-d $Opt{"cache_directory"} and -r $Opt{"cache_directory"}
!ll&&!rl&&r
000
MC/DC0%0/3
-d $Opt{"cache_directory"} and -r $Opt{"cache_directory"} and -w $Opt{"cache_directory"}
-d $Opt{"cache_directory"} -r $Opt{"cache_directory"} -w $Opt{"cache_directory"}
Truth table0%0/4
A and B and C
A= -d $Opt{"cache_directory"}B= -r $Opt{"cache_directory"}C= -w $Opt{"cache_directory"}
ABCresult
0XX0
10X0
1100
1111
123 0 warn "$ME: Not a read-write directory --cache_directory='$Opt{cache_directory}'\n";
124 }
125 0 $xref_opt->{cache_directory} = $Opt{cache_directory};
126 }
127  
128 1 my $xref = PPI::Xref->new($xref_opt);
129  
130 1 package Times {
131 1 ▶ use Time::HiRes ();
Subroutine BEGIN: called CC=1 SCAR=0.0
132 3 ▶ sub get { bless [ Time::HiRes::time(), times() ] }
Subroutine get: called CC=1 SCAR=0.0
133 sub diff {
134 0 ▶ my @d = map { $_[0]->[$_] - $_[1]->[$_] } 0..2;
Subroutine diff: not called CC=1 SCAR=6.9
135 0 return (@d, $d[1] + $d[2]);
136 }
137 }
138  
139 1 my $t0 = Times->get();
140  
141 1 ▶if (defined $Opt{files_from_file}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $Opt{"files_from_file"}) 0 1 1
142 0 my $fh;
143 0 ▶ if ($Opt{files_from_file} eq '-') {
Branch: 2 branches
BranchTrueFalseTotal
if ($Opt{'files_from_file'} eq '-') { } 0 0 0
elsif (not open($fh, '<', $Opt{'files_from_file'})) { } 0 0 0
144 0 $fh = *STDIN;
145 } elsif (!open($fh, '<', $Opt{files_from_file})) {
146 0 warn "$ME: Failed to open --files_from_file='$Opt{files_from_file}': $!\n";
147 }
148 1 ▶ use Scalar::Util qw[openhandle];
Subroutine BEGIN: called CC=1 SCAR=0.0
149 0 ▶ if (openhandle($fh)) {
Branch: 1 branch
BranchTrueFalseTotal
if (&openhandle($fh)) { } 0 0 0
150 0 ▶ while (<$fh>) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined($_ = readline $fh)) 0 0 0
151 0 chomp;
152 0 ▶ unless ($xref->process($_)) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($xref->process($_)) 0 0 0
153 0 warn "$ME: Failed to process '$_'\n";
154 }
155 }
156 } else {
157 0 help();
158 }
159 }
160 1 ▶if (defined $Opt{files_from_cache}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $Opt{"files_from_cache"}) 0 1 1
161 0 $xref->process_files_from_cache();
162 }
163 1 ▶if (defined $Opt{files_from_system}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $Opt{"files_from_system"}) 0 1 1
164 0 $xref->process_files_from_system();
165 }
166 1 ▶if (defined $Opt{code}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $Opt{"code"}) 1 0 1
167 1 ▶ if ($Opt{auto_semicolon}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Opt{"auto_semicolon"}) 1 0 1
168 1 ▶ unless ($Opt{code} =~ /[;}]\s*$/) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($Opt{"code"} =~ /[;}]\s*$/) 1 0 1
169 1 $Opt{code} .= ';';
170 }
171 }
172 1 $xref->process(\$Opt{code});
173 }
174 1 ▶if (@ARGV) {
Branch: 1 branch
BranchTrueFalseTotal
if (@ARGV) 0 1 1
175 0 $xref->process(@ARGV);
176 }
177  
178 1 my $t1 = Times->get();
179  
180 sub emit {
181 6 ▶ my ($xref, $opt, $cb) = @_;
Subroutine emit: called CC=8 SCAR=22.2
182 6 my $fh;
183 6 ▶ if (defined $Opt{report_prefix}) {
Branch: 1 branch
BranchTrueFalseTotal
if (defined $Opt{'report_prefix'}) { } 0 6 6
184 0 my $fn = $Opt{report_prefix} . "$opt.txt";
185 0 ▶ open($fh, ">", $fn) or die qq[$0: Failed to create "$fn": $!\n];
Branch: 1 branch
BranchTrueFalseTotal
open $fh, ">", $fn or die qq[$0: Failed to create "$fn": $!\n] 0 0 0
186 0 print "$ME: Created $fn\n";
187 } else {
188 6 $fh = *STDOUT;
189 }
190 6 my $report_title = $Opt{report_title};;
191 6 ▶ if (($opt eq 'missing_modules' && !$xref->missing_modules) ||
Branch: 1 branch
BranchTrueFalseTotal
if ($opt eq "missing_modules" and not $xref->missing_modules or $opt eq "parse_errors" and not $xref->parse_errors_files) 2 4 6
Condition77%7/9
$opt eq "missing_modules" and not $xref->missing_modules or $opt eq "parse_errors" and not $xref->parse_errors_files
l!l&&r!l&&!r
132
$opt eq "missing_modules" and not $xref->missing_modules
!ll&&!rl&&r
501
$opt eq "parse_errors" and not $xref->parse_errors_files
!ll&&!rl&&r
401
MC/DC0%0/4
$opt eq "missing_modules" and not $xref->missing_modules or $opt eq "parse_errors" and not $xref->parse_errors_files
$opt eq "missing_modules" not $xref->missing_modules $opt eq "parse_errors" not $xref->parse_errors_files
Truth table28%2/7
A and not(B) or C and not(D)
A= $opt eq "missing_modules"B= not $xref->missing_modulesC= $opt eq "parse_errors"D= not $xref->parse_errors_files
ABCDresult
11XX1
0X111
10111
0X0X0
0X100
100X0
10100
192 ($opt eq 'parse_errors' && !$xref->parse_errors_files)) {
193 2 $report_title = 0;
194 }
195 6 ▶ print { $fh } "=== $opt ===\n" if $report_title;
Branch: 1 branch
BranchTrueFalseTotal
if $report_title 4 2 6
196 6 $cb->($xref, $fh);
197 }
198  
199 1 ▶unless ($Opt{parse}) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($Opt{"parse"}) 1 0 1
200 my %cb = (
201 files => sub {
202 1 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: called CC=2 SCAR=6.9
203 1 for my $f ($xref->files) {
204 2 print { $fh } $f, "\n";
205 }
206 },
207 subs => sub{
208 1 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: called CC=2 SCAR=6.9
209 1 for my $s ($xref->subs) {
210 2 print { $fh } $s, "\n";
211 }
212 },
213 packages => sub {
214 0 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: not called CC=2 SCAR=17.9
215 0 for my $p ($xref->packages) {
216 0 print { $fh } $p, "\n";
217 }
218 },
219 modules => sub {
220 0 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: not called CC=2 SCAR=17.9
221 0 for my $p ($xref->modules) {
222 0 print { $fh } $p, "\n";
223 }
224 },
225 total_lines => sub {
226 0 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: not called CC=1 SCAR=6.9
227 0 print { $fh } $xref->total_lines, "\n";
228 },
229 files_lines => sub {
230 0 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: not called CC=2 SCAR=17.9
231 0 for my $f ($xref->files) {
232 0 print { $fh } $f, $Opt{separator}, $xref->file_lines($f), "\n";
233 }
234 },
235 files_counts => sub {
236 0 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: not called CC=2 SCAR=17.9
237 0 for my $f ($xref->files) {
238 0 print { $fh } $f, $Opt{separator}, $xref->file_count($f), "\n";
239 }
240 },
241 modules_counts => sub {
242 0 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: not called CC=2 SCAR=17.9
243 0 for my $f ($xref->modules) {
244 0 print { $fh } $f, $Opt{separator}, $xref->module_count($f), "\n";
245 }
246 },
247 missing_modules => sub {
248 1 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: called CC=2 SCAR=9.2
249 1 for my $m ($xref->missing_modules) {
250 0 print { $fh } $m, $Opt{separator}, $xref->missing_module_count($m), $Opt{separator}, join($Opt{separator}, $xref->missing_module_lines($m)), "\n";
251 }
252 },
253 parse_errors => sub {
254 1 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: called CC=4 SCAR=25.8
255 1 for my $f ($xref->parse_errors_files) {
256 0 my %e = $xref->file_parse_errors($f);
257 0 ▶ my @e = map { defined $e{$_} ? "$e{$_}" : $_ }
Branch: 1 branch
BranchTrueFalseTotal
defined $e{$_} ? : 0 0 0
258 0 ▶ sort { $a cmp $b || $e{$a} cmp $e{$b} }
Branch: 1 branch
BranchTrueFalseTotal
$a cmp $b or $e{$a} cmp $e{$b} 0 0 0
259 sort keys %e;
260 0 print { $fh } $f, $Opt{separator}, "@e\n";
261 }
262 },
263 incs_deps => sub {
264 0 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: not called CC=2 SCAR=17.9
265 0 my $id = $xref->incs_deps;
266 0 for my $f ($id->files) {
267 0 print { $fh } $f, $Opt{separator}, $id->file_kind($f), "\n";
268 }
269 },
270 subs_files => sub {
271 1 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: called CC=2 SCAR=6.9
272 my $sfi = $xref->subs_files_iter({separator => $Opt{separator},
273 column => $Opt{column},
274 1 finish => $Opt{finish}});
275 1 ▶ while (my $sf = $sfi->next) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $sf = $sfi->next) 2 1 3
276 2 print { $fh } $sf->string, "\n";
277 }
278 },
279 packages_files => sub {
280 0 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: not called CC=2 SCAR=17.9
281 my $pfi = $xref->packages_files_iter({separator => $Opt{separator},
282 column => $Opt{column},
283 0 finish => $Opt{finish}});
284 0 ▶ while (my $pf = $pfi->next) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $pf = $pfi->next) 0 0 0
285 0 print { $fh } $pf->string, "\n";
286 }
287 },
288 incs_files => sub {
289 1 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: called CC=2 SCAR=6.9
290 my $ifi = $xref->incs_files_iter({separator => $Opt{separator},
291 column => $Opt{column},
292 1 finish => $Opt{finish}});
293 1 ▶ while (my $if = $ifi->next) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $if = $ifi->next) 1 1 2
294 1 print { $fh } $if->string, "\n";
295 }
296 },
297 incs_chains => sub {
298 0 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: not called CC=2 SCAR=17.9
299 0 my $ici = $xref->incs_chains_iter({separator => $Opt{separator}});
300 0 ▶ while (my $ic = $ici->next) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $ic = $ici->next) 0 0 0
301 0 print { $fh } $ic->string, "\n";
302 }
303 },
304 incs_chains_reverse => sub {
305 0 ▶ my ($xref, $fh) = @_;
Subroutine __ANON__: not called CC=2 SCAR=17.9
306 my $ici = $xref->incs_chains_iter({separator => $Opt{separator},
307 0 reverse_chains => 1});
308 0 ▶ while (my $ic = $ici->next) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $ic = $ici->next) 0 0 0
309 0 print { $fh } $ic->string, "\n";
310 }
311 },
312 1 );
313 1 for my $opt (@ACTION) {
314 16 ▶ if ($Opt{$opt}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Opt{$opt}) 6 10 16
315 6 ▶ die qq[$ME: Unexpected callback '$opt'\n] unless defined $cb{$opt};
Branch: 1 branch
BranchTrueFalseTotal
unless defined $cb{$opt} 0 6 6
316 6 emit($xref, $opt, $cb{$opt});
317 }
318 }
319 }
320  
321 1 my $t2 = Times->get();
322  
323 1 ▶if ($Opt{summary}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Opt{"summary"}) 0 1 1
324 0 my ($dw1, $du1, $ds1, $dc1) = $t1->diff($t0);
325 0 ▶ printf("$ME: files=%d lines=%d subs=%d\n",
Condition0%0/6
$xref->files || 0
l!l
00
$xref->total_lines || 0
l!l
00
$xref->subs || 0
l!l
00
MC/DC0%0/1
$xref->files || 0
$xref->files
MC/DC0%0/1
$xref->total_lines || 0
$xref->total_lines
MC/DC0%0/1
$xref->subs || 0
$xref->subs
Truth table0%0/2
A
A= $xref->files
Aresult
11
00
Truth table0%0/2
A
A= $xref->total_lines
Aresult
11
00
Truth table0%0/2
A
A= $xref->subs
Aresult
11
00
326 $xref->files || 0,
327 $xref->total_lines || 0,
328 $xref->subs || 0);
329 0 printf("$ME: docs_created=%d cache reads=%d writes=%d updates=%d creates=%d deletes=%d\n",
330 $xref->docs_created,
331 $xref->cache_reads,
332 $xref->cache_writes,
333 $xref->cache_updates,
334 $xref->cache_creates,
335 $xref->cache_deletes);
336 0 printf("$ME: parse: wall=%.2fs user=%.2fs system=%.2fs cpu=%.2fs\n",
337 $dw1, $du1, $ds1, $dc1);
338 0 my ($dw2, $du2, $ds2, $dc2) = $t2->diff($t1);
339 0 printf("$ME: output: wall=%.2fs user=%.2fs system=%.2fs cpu=%.2fs\n",
340 $dw2, $du2, $ds2, $dc2);
341 }
342  
343 1 exit(0);
344  
345 __DATA__
« blib/lib/PPI/Xref.pm ↑ Summary