blib/lib/Text/Chompp.pm

filter: Statementstmt 100% 20 / 20 Branchbran 100% 8 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 2 totaltotal 94.2% 33 / 35 CC 7 SCAR 11.6
CC
7
Cov
100%
chompp
4.0
chopp
4.0
BEGIN
1.0
CRAP 3.2
↑ Summary
1 package Text::Chompp;
2  
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 ▶use base 'Exporter';
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 our @EXPORT_OK = qw/ chompp chopp /;
8  
9 # ABSTRACT: chomp and chop replacements that pass the changed value(s) back
10  
11 3 our $VERSION = '0.001'; # VERSION
12  
13  
14 9 ▶sub chompp {
Subroutine chompp: called CC=4 SCAR=13.9
Pod undocumented
15 9 my @val = @_;
16 9 ▶ @val = ($_) unless @val;
Branch: 1 branch
BranchTrueFalseTotal
unless @val 4 5 9
17  
18 9 chomp foreach @val;
19 9 ▶ return wantarray ? @val : $val[0];
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 8 1 9
20 }
21  
22 7 ▶sub chopp {
Subroutine chopp: called CC=4 SCAR=13.9
Pod undocumented
23 7 my @val = @_;
24 7 ▶ @val = ($_) unless @val;
Branch: 1 branch
BranchTrueFalseTotal
unless @val 2 5 7
25  
26 7 chop foreach @val;
27 7 ▶ return wantarray ? @val : $val[0];
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 6 1 7
28 }
29  
30  
31 3 1;
32  
33 __END__
↑ Summary