Perl/EasyPack.pm

filter: Statementstmt 100% 17 / 17 Branchbran 100% 4 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod 0.0% 0 / 1 totaltotal 96.0% 24 / 25 CC 4 SCAR 11.0
CC
4
Cov
100%
split_pack_list
4.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.0
« Perl/ParseFlags.pm ↑ Summary Perl/getdents.pm »
1 package Linux::Perl::EasyPack;
2  
3 17 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 17 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 #Do not use in external code. This interface may change.
7 19 ▶sub split_pack_list {
Subroutine split_pack_list: called CC=4 SCAR=13.9
Pod undocumented
8 19 my (@array) = @_;
9  
10 19 my $pack = q<>;
11 19 my @keys;
12  
13 19 for my $i (0 .. $#array) {
14 256 ▶ if ($i % 2) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i % 2) { } 128 128 256
15 128 ▶ if (index($array[$i], 'x') == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (index($array[$i], "x") == 0) 2 126 128
16 2 pop @keys;
17 }
18  
19 128 $pack .= $array[$i];
20 }
21 else {
22 128 push @keys, $array[$i];
23 }
24 }
25  
26 19 return \@keys, $pack;
27 }
28  
29 17 1;
« Perl/ParseFlags.pm ↑ Summary Perl/getdents.pm »