data/TWiki/CGISessionSerializeYamlDotPm.txt,v
changeset 0 414e01d06fd5
equal deleted inserted replaced
-1:000000000000 0:414e01d06fd5
       
     1 head	1.1;
       
     2 access;
       
     3 symbols;
       
     4 locks; strict;
       
     5 comment	@# @;
       
     6 
       
     7 
       
     8 1.1
       
     9 date	2008.01.22.03.21.25;	author TWikiContributor;	state Exp;
       
    10 branches;
       
    11 next	;
       
    12 
       
    13 
       
    14 desc
       
    15 @buildrelease
       
    16 @
       
    17 
       
    18 
       
    19 1.1
       
    20 log
       
    21 @buildrelease
       
    22 @
       
    23 text
       
    24 @---+ Package ==
       
    25 
       
    26 %TOC%
       
    27 =head1 NAME
       
    28 
       
    29 CGI::Session::Serialize::yaml - serializer for CGI::Session
       
    30 
       
    31 =head1 DESCRIPTION
       
    32 
       
    33 This library can be used by CGI::Session to serialize session data. It uses
       
    34 L<YAML|YAML>, or the faster C implementation, L<YAML::Syck|YAML::Syck>
       
    35 if it is available. YAML serializers exist not just for Perl but also other
       
    36 dynamic languages, such as PHP, Python, and Ruby, so storing session data
       
    37 in this format makes it easy to share session data across different languages.
       
    38 
       
    39 YAML is made to be friendly for humans to parse as well as other computer
       
    40 languages. It creates a format that is easier to read than the default
       
    41 serializer.
       
    42 
       
    43 =head1 METHODS
       
    44 
       
    45 =over 4
       
    46 
       
    47 =item freeze($class, \%hash)
       
    48 
       
    49 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()">
       
    50 
       
    51 =item thaw($class, $string)
       
    52 
       
    53 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()">
       
    54 
       
    55 =back
       
    56 
       
    57 =head1 SEE ALSO
       
    58 
       
    59 L<CGI::Session>, L<YAML>, L<YAML::Syck>.
       
    60 
       
    61 @