Package ==

=head1 NAME

CGI::Session::Serialize::yaml - serializer for CGI::Session

=head1 DESCRIPTION

This library can be used by CGI::Session to serialize session data. It uses L<YAML|YAML>, or the faster C implementation, L<YAML::Syck|YAML::Syck> if it is available. YAML serializers exist not just for Perl but also other dynamic languages, such as PHP, Python, and Ruby, so storing session data in this format makes it easy to share session data across different languages.

YAML is made to be friendly for humans to parse as well as other computer languages. It creates a format that is easier to read than the default serializer.

=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()">

=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<set_error()|CGI::Session::ErrorHandler/"set_error()">

=back

=head1 SEE ALSO

L<CGI::Session>, L, L<YAML::Syck>.

Topic revision: r1 - 2010-10-11 - TWikiContributor
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
Note: Please contribute updates to this topic on TWiki.org at TWiki:TWiki.CGISessionSerializeYamlDotPm.