| 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'
MC/DC100%1/1
$self->encoding || 'utf8'
$self->encoding
Truth table100%2/2
A
A= $self->encoding
| |||||||||||||
| 15 | |||||||||||||
| 16 | 2 | ▶ | return $encoding eq 'utf8' | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 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__ | ||||||||||||