Orientation/StringOperation.pm

filter: Statementstmt 90.0% 9 / 10 Branchbran 50.0% 4 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 4 totaltotal 66.6% 18 / 27 CC 5 SCAR 7.3
CC
5
Cov
72%
new
2.5
length
2.1
reverse
2.1
CRAP 2.1
« Orientation.pm ↑ Summary
1 package Text::Orientation::StringOperation;
2 1 ▶use String::Multibyte;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 14 ▶sub new{
Subroutine new: called CC=2 SCAR=9.2
Pod undocumented
5 14 ▶ return bless { MB => String::Multibyte->new($_[1]) }, $_[0] if $_[1];
Branch: 1 branch
BranchTrueFalseTotal
if $_[1] 14 0 14
6 0 bless {},$_[0];
7 }
8  
9 85 ▶sub length { $_[0]->{MB} ? $_[0]->{MB}->length($_[1]) : length $_[1] }
Subroutine length: called CC=2 SCAR=7.6
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{'MB'} ? : 85 0 85
10 8 ▶sub reverse { $_[0]->{MB} ? $_[0]->{MB}->strrev($_[1]) : reverse $_[1] }
Subroutine reverse: called CC=2 SCAR=7.6
Pod undocumented
Branch: 1 branch
BranchTrueFalseTotal
$_[0]{'MB'} ? : 8 0 8
11 80 ▶sub substr {
Subroutine substr: called CC=2 SCAR=7.2
Pod undocumented
12 80 my $pkg = shift;
13 80 ▶ $pkg->{MB} ? $pkg->{MB}->substr(@_) :
Branch: 1 branch
BranchTrueFalseTotal
$pkg->{'MB'} ? : 80 0 80
14 substr(shift, shift, shift);
15 }
16  
17  
18 1 1;
« Orientation.pm ↑ Summary