diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2007-11-14 18:33:19 +0100 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2007-11-14 18:33:19 +0100 |
commit | ff7b9de82908baf1d5f9af71e35dad2369bfdc2f (patch) | |
tree | 1f9821bf2323786cbe68b4d3b0964ca449332766 /qooxdoo/source/perl/CGI/Session/Serialize/storable.pm | |
parent | d546419d19b89633f8ac3c461eb900f4c4f29b90 (diff) | |
download | smokeping-ff7b9de82908baf1d5f9af71e35dad2369bfdc2f.tar.gz smokeping-ff7b9de82908baf1d5f9af71e35dad2369bfdc2f.tar.xz |
initial qooxdoo drop for smokeping
Diffstat (limited to 'qooxdoo/source/perl/CGI/Session/Serialize/storable.pm')
-rw-r--r-- | qooxdoo/source/perl/CGI/Session/Serialize/storable.pm | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/qooxdoo/source/perl/CGI/Session/Serialize/storable.pm b/qooxdoo/source/perl/CGI/Session/Serialize/storable.pm new file mode 100644 index 0000000..6ac2dae --- /dev/null +++ b/qooxdoo/source/perl/CGI/Session/Serialize/storable.pm @@ -0,0 +1,60 @@ +package CGI::Session::Serialize::storable; + +# $Id: storable.pm 351 2006-11-24 14:16:50Z markstos $ + +use strict; +use Storable; +require CGI::Session::ErrorHandler; + +$CGI::Session::Serialize::storable::VERSION = "4.20"; +@CGI::Session::Serialize::ISA = ( "CGI::Session::ErrorHandler" ); + +=pod + +=head1 NAME + +CGI::Session::Serialize::storable - Serializer for CGI::Session + +=head1 DESCRIPTION + +This library can be used by CGI::Session to serialize session data. Uses L<Storable|Storable>. + +=head1 METHODS + +=over 4 + +=item freeze($class, \%hash) + +Receives two arguments. First is the class name, the second is the data to be serialized. +Should return serialized string on success, undef on failure. Error message should be set using +C<set_error()|CGI::Session::ErrorHandler/"set_error()"> + +=cut + +sub freeze { + my ($self, $data) = @_; + return Storable::freeze($data); +} + +=item thaw($class, $string) + +Receives two arguments. First is the class name, second is the I<frozen> data string. Should return +thawed data structure on success, undef on failure. Error message should be set +using C<set_error()|CGI::Session::ErrorHandler/"set_error()"> + +=back + +=cut + +sub thaw { + my ($self, $string) = @_; + return Storable::thaw($string); +} + +=head1 LICENSING + +For support and licensing see L<CGI::Session|CGI::Session> + +=cut + +1; |