From ff7b9de82908baf1d5f9af71e35dad2369bfdc2f Mon Sep 17 00:00:00 2001 From: Tobi Oetiker Date: Wed, 14 Nov 2007 17:33:19 +0000 Subject: initial qooxdoo drop for smokeping --- .../perl/CGI/Session/Serialize/freezethaw.pm | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 qooxdoo/source/perl/CGI/Session/Serialize/freezethaw.pm (limited to 'qooxdoo/source/perl/CGI/Session/Serialize/freezethaw.pm') diff --git a/qooxdoo/source/perl/CGI/Session/Serialize/freezethaw.pm b/qooxdoo/source/perl/CGI/Session/Serialize/freezethaw.pm new file mode 100644 index 0000000..c71ece8 --- /dev/null +++ b/qooxdoo/source/perl/CGI/Session/Serialize/freezethaw.pm @@ -0,0 +1,55 @@ +package CGI::Session::Serialize::freezethaw; + +# $Id: freezethaw.pm 351 2006-11-24 14:16:50Z markstos $ + +use strict; +use FreezeThaw; +use CGI::Session::ErrorHandler; + +$CGI::Session::Serialize::freezethaw::VERSION = 4.2; +@CGI::Session::Serialize::freezethaw::ISA = ( "CGI::Session::ErrorHandler" ); + +sub freeze { + my ($self, $data) = @_; + return FreezeThaw::freeze($data); +} + + +sub thaw { + my ($self, $string) = @_; + return (FreezeThaw::thaw($string))[0]; +} + +1; + +__END__; + +=pod + +=head1 NAME + +CGI::Session::Serialize::freezethaw - serializer for CGI::Session + +=head1 DESCRIPTION + +This library can be used by CGI::Session to serialize session data. Uses L. + +=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 + +=item thaw($class, $string) + +Received two arguments. First is the class name, second is the I data string. Should return thawed data structure on success, undef on failure. Error message should be set using C + +=back + +=head1 LICENSING + +For support and licensing see L + +=cut -- cgit v1.2.3-24-g4f1b