data/TWiki/CGISessionSerializeYamlDotPm.txt,v
changeset 0 414e01d06fd5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/data/TWiki/CGISessionSerializeYamlDotPm.txt,v	Sat Jan 26 15:50:53 2008 +0100
     1.3 @@ -0,0 +1,61 @@
     1.4 +head	1.1;
     1.5 +access;
     1.6 +symbols;
     1.7 +locks; strict;
     1.8 +comment	@# @;
     1.9 +
    1.10 +
    1.11 +1.1
    1.12 +date	2008.01.22.03.21.25;	author TWikiContributor;	state Exp;
    1.13 +branches;
    1.14 +next	;
    1.15 +
    1.16 +
    1.17 +desc
    1.18 +@buildrelease
    1.19 +@
    1.20 +
    1.21 +
    1.22 +1.1
    1.23 +log
    1.24 +@buildrelease
    1.25 +@
    1.26 +text
    1.27 +@---+ Package ==
    1.28 +
    1.29 +%TOC%
    1.30 +=head1 NAME
    1.31 +
    1.32 +CGI::Session::Serialize::yaml - serializer for CGI::Session
    1.33 +
    1.34 +=head1 DESCRIPTION
    1.35 +
    1.36 +This library can be used by CGI::Session to serialize session data. It uses
    1.37 +L<YAML|YAML>, or the faster C implementation, L<YAML::Syck|YAML::Syck>
    1.38 +if it is available. YAML serializers exist not just for Perl but also other
    1.39 +dynamic languages, such as PHP, Python, and Ruby, so storing session data
    1.40 +in this format makes it easy to share session data across different languages.
    1.41 +
    1.42 +YAML is made to be friendly for humans to parse as well as other computer
    1.43 +languages. It creates a format that is easier to read than the default
    1.44 +serializer.
    1.45 +
    1.46 +=head1 METHODS
    1.47 +
    1.48 +=over 4
    1.49 +
    1.50 +=item freeze($class, \%hash)
    1.51 +
    1.52 +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()">
    1.53 +
    1.54 +=item thaw($class, $string)
    1.55 +
    1.56 +Received two arguments. First is the class name, second is the I<YAML> 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()">
    1.57 +
    1.58 +=back
    1.59 +
    1.60 +=head1 SEE ALSO
    1.61 +
    1.62 +L<CGI::Session>, L<YAML>, L<YAML::Syck>.
    1.63 +
    1.64 +@