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,
17 4 ▶ base => 'Badger::Codec';
Subroutine BEGIN: called CC=1 SCAR=0.0
18  
19 4 ▶use Storable qw( freeze thaw );
Subroutine BEGIN: called CC=1 SCAR=0.0
20  
21 sub encode {
22 12 ▶ my $self = shift;
Subroutine encode: called CC=1 SCAR=0.0
Pod documented
23 12 freeze(@_);
24 }
25  
26 sub decode {
27 12 ▶ my $self = shift;
Subroutine decode: called CC=1 SCAR=0.0
Pod documented
28 12 thaw(@_);
29 }
30  
31 # shortcuts straight to the real encoder/decoder subs for efficient aliasing
32  
33 sub encoder {
34 4 ▶ \&freeze;
Subroutine encoder: called CC=1 SCAR=0.0
Pod documented
35 }
36  
37 sub decoder {
38 4 ▶ \&thaw;
Subroutine decoder: called CC=1 SCAR=0.0
Pod documented
39 }
40  
41  
42 4 1;
43  
44 __END__
« lib/Badger/Codec/Encode.pm ↑ Summary lib/Badger/Codec/Timestamp.pm »