blib/lib/App/diff2vba/Util.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 5 | 13 | 38.4 |
branch | 0 | 2 | 0.0 |
condition | n/a | ||
subroutine | 2 | 3 | 66.6 |
pod | 0 | 1 | 0.0 |
total | 7 | 19 | 36.8 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | use v5.14; | ||||||
2 | 1 | 1 | 11 | use warnings; | |||
1 | 3 | ||||||
3 | 1 | 1 | 4 | ||||
1 | 2 | ||||||
1 | 132 | ||||||
4 | local $_ = shift; | ||||||
5 | my $count = shift; | ||||||
6 | 0 | 0 | 0 | my $len = int((length($_) + $count - 1) / $count); | |||
7 | 0 | my @split; | |||||
8 | 0 | while (length) { | |||||
9 | 0 | push @split, substr($_, 0, $len, ''); | |||||
10 | 0 | } | |||||
11 | 0 | @split == $count or die; | |||||
12 | @split; | ||||||
13 | 0 | 0 | } | ||||
14 | 0 | ||||||
15 | 1; |