File Coverage

blib/lib/CHI/Serializer/Storable.pm
Criterion Covered Total %
statement 14 15 93.3
branch n/a
condition n/a
subroutine 6 7 85.7
pod 0 3 0.0
total 20 25 80.0


line stmt bran cond sub pod time code
1             # Default serializer class, so that we don't have to depend on Data::Serializer.
2             # Recommend Data::Serializer for other serializers, rather than reinventing the wheel.
3             #
4             package CHI::Serializer::Storable;
5             $CHI::Serializer::Storable::VERSION = '0.61';
6 20     20   149 use Moo;
  20         47  
  20         160  
7 20     20   22690 use Storable;
  20         69533  
  20         1399  
8 20     20   183 use strict;
  20         48  
  20         505  
9 20     20   114 use warnings;
  20         39  
  20         2190  
10              
11             sub serialize {
12 211     211 0 901 return Storable::nfreeze( $_[1] );
13             }
14              
15             sub deserialize {
16 233     233 0 866 return Storable::thaw( $_[1] );
17             }
18              
19             sub serializer {
20 0     0 0   return 'Storable';
21             }
22              
23             1;