KiokuDB/TypeMap/Entry/JSON/Scalar.pm

filter: Statementstmt 89.6% 26 / 29 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 88.8% 8 / 9 Podpod 0.0% 0 / 3 totaltotal 82.9% 34 / 41 CC 1 SCAR 1.3
CC
1
Cov
90%
__ANON__
2.0
compile_refresh
1.2
BEGIN
1.0
CRAP 1.1
« KiokuDB/Test/Fixture/GIN/Class.pm ↑ Summary KiokuDB/TypeMap/Entry/Naive.pm »
1 package KiokuDB::TypeMap::Entry::JSON::Scalar;
2 6 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 6 ▶no warnings 'recursion';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 6 ▶use namespace::clean -except => 'meta';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 6 with qw(KiokuDB::TypeMap::Entry::Std);
9  
10 sub compile_collapse_body {
11 11 ▶ my ( $self, $class ) = @_;
Subroutine compile_collapse_body: called CC=1 SCAR=0.0
Pod undocumented
12  
13 return sub {
14 14 ▶ my ( $collapser, %args ) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
15  
16 14 my $scalar = $args{object};
17
18 14 my $data = $collapser->visit($$scalar);
19  
20 14 $collapser->make_entry(
21 %args,
22 class => "SCALAR",
23 data => $data,
24 );
25 11 };
26 }
27  
28 sub compile_expand {
29 11 ▶ my ( $self, $reftype ) = @_;
Subroutine compile_expand: called CC=1 SCAR=0.0
Pod undocumented
30  
31 sub {
32 14 ▶ my ( $linker, $entry ) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
33  
34 14 my $scalar;
35  
36 14 $linker->inflate_data($entry->data, \$scalar);
37  
38 14 return \$scalar;
39 }
40 11 }
41  
42 sub compile_refresh {
43 11 ▶ my ( $self, $class, @args ) = @_;
Subroutine compile_refresh: called CC=1 SCAR=2.0
Pod undocumented
44  
45 return sub {
46 0 ▶ my ( $linker, $scalar, $entry ) = @_;
Subroutine __ANON__: not called CC=1 SCAR=6.9
47  
48 0 $linker->inflate_data($entry->data, $scalar );
49  
50 0 return $scalar;
51 11 };
52 }
53  
54 6 __PACKAGE__->meta->make_immutable;
55  
56 6 __PACKAGE__
57  
58 __END__
« KiokuDB/Test/Fixture/GIN/Class.pm ↑ Summary KiokuDB/TypeMap/Entry/Naive.pm »