File Coverage

blib/lib/Ark/Plugin/Encoding/Unicode.pm
Criterion Covered Total %
statement 16 16 100.0
branch 2 2 100.0
condition 2 3 66.6
subroutine 6 6 100.0
pod 0 2 0.0
total 26 29 89.6


line stmt bran cond sub pod time code
1             package Ark::Plugin::Encoding::Unicode;
2 58     58   54226 use strict;
  58         138  
  58         2264  
3 58     58   335 use warnings;
  58         139  
  58         1990  
4 58     58   23922 use Ark::Plugin;
  58         168  
  58         385  
5 58     58   393 use Encode;
  58         108  
  58         13412  
6              
7 279     279 0 675 sub prepare_encoding { }
8              
9             sub finalize_encoding {
10 279     279 0 567 my $self = shift;
11              
12 279         905 my $res = $self->response;
13 279 100 66     4428 $res->body(encode_utf8 $res->body ) if !$res->binary and $res->has_body;
14             };
15              
16             1;