File Coverage

blib/lib/CGI/Session/Serialize/storable.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 2 2 100.0
total 16 16 100.0


line stmt bran cond sub pod time code
1             package CGI::Session::Serialize::storable;
2              
3             # $Id: storable.pm 216 2005-09-01 10:52:26Z sherzodr $
4              
5 4     4   21 use strict;
  4         7  
  4         176  
6 4     4   24 use Storable;
  4         6  
  4         666  
7             require CGI::Session::ErrorHandler;
8              
9             $CGI::Session::Serialize::storable::VERSION = "1.5";
10             @CGI::Session::Serialize::ISA = ( "CGI::Session::ErrorHandler" );
11              
12             =pod
13              
14             =head1 NAME
15              
16             CGI::Session::Serialize::storable - Serializer for CGI::Session
17              
18             =head1 DESCRIPTION
19              
20             This library can be used by CGI::Session to serialize session data. Uses L.
21              
22             =head1 METHODS
23              
24             =over 4
25              
26             =item freeze($class, \%hash)
27              
28             Receives two arguments. First is the class name, the second is the data to be serialized.
29             Should return serialized string on success, undef on failure. Error message should be set using
30             C
31              
32             =cut
33              
34             sub freeze {
35 8     8 1 17 my ($self, $data) = @_;
36 8         43 return Storable::freeze($data);
37             }
38              
39             =item thaw($class, $string)
40              
41             Receives two arguments. First is the class name, second is the I data string. Should return
42             thawed data structure on success, undef on failure. Error message should be set
43             using C
44              
45             =back
46              
47             =cut
48              
49             sub thaw {
50 7     7 1 17 my ($self, $string) = @_;
51 7         33 return Storable::thaw($string);
52             }
53              
54             =head1 LICENSING
55              
56             For support and licensing see L
57              
58             =cut
59              
60             1;