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/Constants.pm ↑ Summary Perl/X/Base.pm »
1 package Linux::Perl::EasyPack;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 #Do not use in external code. This interface may change.
7 sub split_pack_list {
8 4 ▶ my (@array) = @_;
Subroutine split_pack_list: called CC=4 SCAR=13.9
Pod undocumented
9  
10 4 my $pack = q<>;
11 4 my @keys;
12  
13 4 for my $i (0 .. $#array) {
14 64 ▶ if ($i % 2) {
Branch: 1 branch
BranchTrueFalseTotal
if ($i % 2) { } 32 32 64
15 32 ▶ if (index($array[$i], 'x') == 0) {
Branch: 1 branch
BranchTrueFalseTotal
if (index($array[$i], "x") == 0) 2 30 32
16 2 pop @keys;
17 }
18  
19 32 $pack .= $array[$i];
20 }
21 else {
22 32 push @keys, $array[$i];
23 }
24 }
25  
26 4 return \@keys, $pack;
27 }
28  
29 2 1;
« Perl/Constants.pm ↑ Summary Perl/X/Base.pm »