blib/lib/DBIx/Class/ResultClass/HashRefInflator/UTF8.pm

filter: Statementstmt 66.6% 14 / 21 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 52.7% 19 / 36 CC 4 SCAR 23.5
CC
4
Cov
50%
inflate_result
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 10.5
↑ Summary
1 package DBIx::Class::ResultClass::HashRefInflator::UTF8;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # ABSTRACT: Get raw hashrefs from a resultset with utf-8 flag
8  
9 2 our $VERSION = '1.000001'; # VERSION
10  
11 2 ▶use parent qw( DBIx::Class::ResultClass::HashRefInflator );
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 sub inflate_result {
14 0 ▶ my ( $self, @args ) = @_;
Subroutine inflate_result: not called CC=4 SCAR=30.0
Pod documented
15 0 my $res = $self->SUPER::inflate_result( @args );
16 0 ▶ return $res if ref($res) ne 'HASH';
Branch: 1 branch
BranchTrueFalseTotal
if ref $res ne "HASH" 0 0 0
17  
18 return {
19 map {
20 0 my $val = $res->{$_};
21 0 ▶ utf8::decode($val) if defined $val && !ref($val);
Branch: 1 branch
BranchTrueFalseTotal
if defined $val and not ref $val 0 0 0
Condition0%0/3
defined $val and not ref $val
!ll&&!rl&&r
000
MC/DC0%0/2
defined $val and not ref $val
defined $val not ref $val
Truth table0%0/3
A and not(B)
A= defined $valB= not ref $val
ABresult
0X0
100
111
22 0 ( $_ => $val );
23 } keys %$res
24 };
25 }
26  
27 2 1;
28  
29 __END__
↑ Summary