lib/Badger/Codec/Storable.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 4 / 4 totaltotal 100% 23 / 23 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
encode
1.0
CRAP 1.0
« lib/Badger/Codec/Encode.pm ↑ Summary lib/Badger/Codec/Timestamp.pm »
1 #========================================================================
2 #
3 # Badger::Codec::Storable
4 #
5 # DESCRIPTION
6 # Codec for encoding/decoding data via the Storable module.
7 #
8 # AUTHOR
9 # Andy Wardley <abw@wardley.org>
10 #
11 #========================================================================
12  
13 package Badger::Codec::Storable;
14  
15 use Badger::Class
16 4 ▶ version => 0.01,
Subroutine BEGIN: called CC=1 SCAR=0.0
17 4 base => 'Badger::Codec';
18  
19 4 ▶use Storable qw( freeze thaw );
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 12 ▶sub encode {
Subroutine encode: called CC=1 SCAR=0.0
Pod documented
22 12 my $self = shift;
23 12 freeze(@_);
24 }
25  
26 12 ▶sub decode {
Subroutine decode: called CC=1 SCAR=0.0
Pod documented
27 12 my $self = shift;
28 12 thaw(@_);
29 }
30  
31 # shortcuts straight to the real encoder/decoder subs for efficient aliasing
32  
33 4 ▶sub encoder {
Subroutine encoder: called CC=1 SCAR=0.0
Pod documented
34 4 \&freeze;
35 }
36  
37 4 ▶sub decoder {
Subroutine decoder: called CC=1 SCAR=0.0
Pod documented
38 4 \&thaw;
39 }
40  
41  
42 4 1;
43  
44 __END__
« lib/Badger/Codec/Encode.pm ↑ Summary lib/Badger/Codec/Timestamp.pm »