DBIx/Class/KiokuDB/EntryProxy.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran 50.0% 1 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 2 totaltotal 81.8% 27 / 33 CC 2 SCAR 3.3
CC
2
Cov
88%
inflate_result
2.1
new
2.0
BEGIN
1.0
CRAP 1.4
« DBIx/Class/KiokuDB.pm ↑ Summary KiokuDB/TypeMap/Entry/DBIC/Row.pm »
1 package DBIx::Class::KiokuDB::EntryProxy;
2 9 ▶BEGIN {
Subroutine BEGIN: called CC=1 SCAR=0.0
3 9 $DBIx::Class::KiokuDB::EntryProxy::AUTHORITY = 'cpan:NUFFIN';
4 }
5 # ABSTRACT: A proxying result class for KiokuDB objects
6 9 $DBIx::Class::KiokuDB::EntryProxy::VERSION = '1.23';
7 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 9 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 9 ▶use base qw(DBIx::Class);
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 ▶sub inflate_result {
Subroutine inflate_result: called CC=2 SCAR=7.2
Pod undocumented
15 1 my ( $self, $source, $data ) = @_;
16  
17 1 my $handle = $source->schema->kiokudb_handle;
18  
19 1 ▶ if ( ref( my $obj = $handle->id_to_object( $data->{id} ) ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (ref(my $obj = $handle->id_to_object($data->{'id'}))) { } 0 1 1
20 0 return $obj;
21 } else {
22 1 my $entry = $handle->backend->deserialize($data->{data});
23 1 return $handle->linker->expand_object($entry);
24 }
25 }
26  
27 0 ▶sub new {
Subroutine new: not called CC=1 SCAR=6.9
Pod undocumented
28 0 croak("Creating new rows via the result set makes no sense, insert them with KiokuDB::insert instead");
29 }
30  
31 # ex: set sw=4 et:
32  
33 9 __PACKAGE__
34  
35 __END__
« DBIx/Class/KiokuDB.pm ↑ Summary KiokuDB/TypeMap/Entry/DBIC/Row.pm »