File Coverage

blib/lib/Ark/Plugin/Encoding/Unicode.pm
Criterion Covered Total %
statement 15 15 100.0
branch 2 2 100.0
condition 2 3 66.6
subroutine 6 6 100.0
pod 0 2 0.0
total 25 28 89.2


line stmt bran cond sub pod time code
1             package Ark::Plugin::Encoding::Unicode;
2 59     59   32733 use strict;
  59         153  
  59         1965  
3 59     59   320 use warnings;
  59         144  
  59         1808  
4 59     59   19455 use Ark::Plugin;
  59         157  
  59         394  
5 59     59   513 use Encode;
  59         148  
  59         11806  
6              
7       280 0   sub prepare_encoding { }
8              
9             sub finalize_encoding {
10 280     280 0 488 my $self = shift;
11              
12 280         649 my $res = $self->response;
13 280 100 66     3668 $res->body(encode_utf8 $res->body ) if !$res->binary and $res->has_body;
14             };
15              
16             1;