| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#!/usr/bin/perl |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
package KiokuDB::Backend::Serialize::Delegate; |
|
4
|
21
|
|
|
21
|
|
11558
|
use Moose::Role; |
|
|
21
|
|
|
|
|
41
|
|
|
|
21
|
|
|
|
|
161
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
21
|
|
|
21
|
|
94939
|
use KiokuDB::Serializer; |
|
|
21
|
|
|
|
|
59
|
|
|
|
21
|
|
|
|
|
905
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
21
|
|
|
21
|
|
118
|
use namespace::clean -except => 'meta'; |
|
|
21
|
|
|
|
|
37
|
|
|
|
21
|
|
|
|
|
109
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
#with qw(KiokuDB::Backend::Serialize); |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has serializer => ( |
|
13
|
|
|
|
|
|
|
does => "KiokuDB::Backend::Serialize", |
|
14
|
|
|
|
|
|
|
is => "ro", |
|
15
|
|
|
|
|
|
|
coerce => 1, |
|
16
|
|
|
|
|
|
|
default => "storable", |
|
17
|
|
|
|
|
|
|
handles => [qw(serialize deserialize)], |
|
18
|
|
|
|
|
|
|
); |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
__PACKAGE__ |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__END__ |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=pod |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 NAME |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
KiokuDB::Backend::Serialize::Delegate - Use a L<KiokuDB::Serializer> object |
|
29
|
|
|
|
|
|
|
instead of a role to handle serialization in a backend. |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
package MyBackend; |
|
34
|
|
|
|
|
|
|
use Moose; |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
with qw( |
|
37
|
|
|
|
|
|
|
... |
|
38
|
|
|
|
|
|
|
KiokuDB::Backend::Serialize::Delegate |
|
39
|
|
|
|
|
|
|
); |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
MyBackend->new( |
|
44
|
|
|
|
|
|
|
serializer => "yaml", |
|
45
|
|
|
|
|
|
|
); |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
This role provides a C<serialzier> attribute (by default |
|
50
|
|
|
|
|
|
|
L<KiokuDB::Serializer::Storable>) with coercions from a moniker string for easy |
|
51
|
|
|
|
|
|
|
serialization format selection. |
|
52
|
|
|
|
|
|
|
|