| 1 | package CGI::Session::Serialize::storable; | ||
| 2 | |||
| 3 | # $Id$ | ||
| 4 | |||
| 5 | 4 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 4 | ▶ | use Storable; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | 4 | require CGI::Session::ErrorHandler; | |
| 8 | |||
| 9 | 4 | $CGI::Session::Serialize::storable::VERSION = '4.43'; | |
| 10 | 4 | @CGI::Session::Serialize::storable::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 | 8 | ▶ | sub freeze { |
|
Subroutine
freeze: called CC=1 SCAR=0.0
Pod
documented
| |||
| 35 | 8 | my ($self, $data) = @_; | |
| 36 | 8 | 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 | 7 | ▶ | sub thaw { |
|
Subroutine
thaw: called CC=1 SCAR=0.0
Pod
documented
| |||
| 50 | 7 | my ($self, $string) = @_; | |
| 51 | 7 | 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 | 4 | 1; | |