KiokuDB/TypeMap/ClassBuilders.pm

filter: Statementstmt 100% 17 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod n/a totaltotal 100% 22 / 22 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
_build_class_accessor_typemap
1.0
CRAP 1.0
« KiokuDB/Test/Person.pm ↑ Summary KiokuDB/TypeMap/Default/Passthrough.pm »
1 #!/usr/bin/perl
2  
3 package KiokuDB::TypeMap::ClassBuilders;
4 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use namespace::clean -except => 'meta';
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 extends qw(KiokuDB::TypeMap);
9  
10 1 with qw(KiokuDB::TypeMap::Composite);
11  
12 1 has [qw(
13 class_accessor_typemap
14 object_tiny_typemap
15 object_inside_out_typemap
16 )] => (
17 traits => [qw(KiokuDB::TypeMap)],
18 does => "KiokuDB::Role::TypeMap",
19 is => "ro",
20 lazy_build => 1,
21 );
22  
23 # Class::Std, Mojo, Badger, Class::MethodMaker, Class::Meta, Class::InsideOut
24  
25 sub _build_class_accessor_typemap {
26 11 ▶ my $self = shift;
Subroutine _build_class_accessor_typemap: called CC=1 SCAR=0.0
27 11 $self->_naive_isa_typemap("Class::Accessor");
28 }
29  
30 sub _build_object_tiny_typemap {
31 11 ▶ my $self = shift;
Subroutine _build_object_tiny_typemap: called CC=1 SCAR=0.0
32 11 $self->_naive_isa_typemap("Object::Tiny");
33 }
34  
35 sub _build_object_inside_out_typemap {
36 11 ▶ my $self = shift;
Subroutine _build_object_inside_out_typemap: called CC=1 SCAR=0.0
37  
38 11 $self->_create_typemap(
39 isa_entries => {
40 "Object::InsideOut" => {
41 type => "KiokuDB::TypeMap::Entry::StorableHook",
42 },
43 },
44 );
45 }
46  
47 1 __PACKAGE__->meta->make_immutable;
48  
49 1 __PACKAGE__
50  
51 __END__
52  
53 =pod
54  
55 =head1 NAME
56  
57 KiokuDB::TypeMap::ClassBuilders - A typemap for standard class builders
58  
59 =head1 SYNOPSIS
60  
61 use KiokuDB::TypeMap::ClassBuilders;
62  
63 my $t = KiokuDB::TypeMap::ClassBuilders->new(
64 exclude => [qw(object_tiny)],
65 );
66  
67 =head1 DESCRIPTION
68  
69 This typemap provides entries for some standard class builders from the CPAN.
70  
71 This class does the L<KiokuDB::TypeMap::Composite> role and can have its sub
72 maps excluded or overridden.
73  
74 =head1 SUPPORTED MODULES
75  
76 =over 4
77  
78 =item L<Class::Accessor>
79  
80 =item L<Object::Tiny>
81  
82 =item L<Object::InsideOut>
83  
84 =back
85  
86 =cut
87  
88  
« KiokuDB/Test/Person.pm ↑ Summary KiokuDB/TypeMap/Default/Passthrough.pm »