KiokuDB/TypeMap/Entry/Std/Expand.pm

filter: Statementstmt 100% 27 / 27 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 2 totaltotal 94.4% 34 / 36 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« KiokuDB/Role/UUIDs/DataUUID.pm ↑ Summary KiokuDB/Backend/Role/Query/Simple/Linear.pm »
1 package KiokuDB::TypeMap::Entry::Std::Expand;
2 23 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 23 ▶no warnings 'recursion';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 23 ▶use namespace::clean -except => 'meta';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 23 requires qw(
9 compile_create
10 compile_clear
11 compile_expand_data
12 );
13  
14 sub compile_expand {
15 307 ▶ my ( $self, $class, @args ) = @_;
Subroutine compile_expand: called CC=1 SCAR=0.0
Pod undocumented
16  
17 307 my $create = $self->compile_create($class, @args);
18 307 my $expand_data = $self->compile_expand_data($class, @args);
19  
20 return sub {
21 4075 ▶ my ( $linker, $entry, @args ) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
22  
23 4075 my ( $instance, @register_args ) = $linker->$create($entry, @args);
24  
25 # this is registered *before* any other value expansion, to allow circular refs
26 4075 $linker->register_object( $entry => $instance, @register_args );
27  
28 4075 $linker->$expand_data($instance, $entry, @args);
29  
30 4075 return $instance;
31 307 };
32 }
33  
34 sub compile_refresh {
35 307 ▶ my ( $self, $class, @args ) = @_;
Subroutine compile_refresh: called CC=1 SCAR=0.0
Pod undocumented
36  
37 307 my $clear = $self->compile_clear($class, @args);
38 307 my $expand_data = $self->compile_expand_data($class, @args);
39  
40 return sub {
41 27 ▶ my ( $linker, $instance, $entry, @args ) = @_;
Subroutine __ANON__: called CC=1 SCAR=0.0
42  
43 27 $linker->$clear($instance, $entry, @args);
44  
45 27 $linker->$expand_data($instance, $entry, @args);
46 307 };
47 }
48  
49 23 __PACKAGE__
50  
51 __END__
« KiokuDB/Role/UUIDs/DataUUID.pm ↑ Summary KiokuDB/Backend/Role/Query/Simple/Linear.pm »