Session/Serialize/storable.pm

filter: Statementstmt 71.4% 10 / 14 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 100% 2 / 2 totaltotal 70.0% 14 / 20 SCAR 0.2
CC
1
Cov
71%
freeze
2.0
thaw
2.0
BEGIN
1.0
CRAP 1.0
« Session/Serialize/freezethaw.pm ↑ Summary Session/ID/md5.pm »
1 package CGI::Session::Serialize::storable;
2  
3 # $Id: storable.pm 216 2005-09-01 10:52:26Z sherzodr $
4  
5 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use Storable;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 2 require CGI::Session::ErrorHandler;
8  
9 2 $CGI::Session::Serialize::storable::VERSION = "1.5";
10 2 @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<Storable|Storable>.
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<set_error()|CGI::Session::ErrorHandler/"set_error()">
31  
32 =cut
33  
34 sub freeze {
35 0 ▶ my ($self, $data) = @_;
Subroutine freeze: not called CC=1 SCAR=6.9
Pod documented
36 0 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<frozen> data string. Should return
42 thawed data structure on success, undef on failure. Error message should be set
43 using C<set_error()|CGI::Session::ErrorHandler/"set_error()">
44  
45 =back
46  
47 =cut
48  
49 sub thaw {
50 0 ▶ my ($self, $string) = @_;
Subroutine thaw: not called CC=1 SCAR=6.9
Pod documented
51 0 return Storable::thaw($string);
52 }
53  
54 =head1 LICENSING
55  
56 For support and licensing see L<CGI::Session|CGI::Session>
57  
58 =cut
59  
60 2 1;
« Session/Serialize/freezethaw.pm ↑ Summary Session/ID/md5.pm »