blib/lib/HTML/FormFu/Filter/Demoroniser.pm

filter: Statementstmt 100% 14 / 14 Branchbran 100% 2 / 2 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 100% 3 / 3 Podpod 100% 1 / 1 totaltotal 100% 23 / 23 CC 3 SCAR 7.9
CC
3
Cov
100%
filter
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.2
↑ Summary
1 package HTML::FormFu::Filter::Demoroniser;
2  
3 2 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use Text::Demoroniser;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 extends 'HTML::FormFu::Filter';
7  
8 2 our $VERSION = '0.02';
9  
10 2 has 'encoding' => ( is => 'rw', traits => ['Chained'] );
11  
12 2 ▶sub filter {
Subroutine filter: called CC=3 SCAR=11.0
Pod documented
13 2 my ( $self, $value ) = @_;
14 2 ▶ my $encoding = $self->encoding || 'utf8';
Condition100%2/2
$self->encoding || 'utf8'
l!l
11
MC/DC100%1/1
$self->encoding || 'utf8'
$self->encoding
Truth table100%2/2
A
A= $self->encoding
Aresult
11
00
15  
16 2 ▶ return $encoding eq 'utf8'
Branch: 1 branch
BranchTrueFalseTotal
$encoding eq 'utf8' ? : 1 1 2
17 ? Text::Demoroniser::demoroniser_utf8( $value )
18 : Text::Demoroniser::demoroniser( $value );
19 }
20  
21 2 __PACKAGE__->meta->make_immutable;
22  
23 2 1;
24  
25 __END__
↑ Summary