data/TWiki/CGISessionDotPm.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.31;	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 *extends* <tt>CGI::Session::ErrorHandler </tt>
       
    26 
       
    27 
       
    28 %TOC%
       
    29 =head1 NAME
       
    30 
       
    31 CGI::Session - persistent session data in CGI applications
       
    32 
       
    33 =head1 SYNOPSIS
       
    34 
       
    35     # Object initialization:
       
    36     use CGI::Session;
       
    37     $session = new CGI::Session();
       
    38 
       
    39     $CGISESSID = $session->id();
       
    40 
       
    41     # send proper HTTP header with cookies:
       
    42     print $session->header();
       
    43 
       
    44     # storing data in the session
       
    45     $session->param('f_name', 'Sherzod');
       
    46     # or
       
    47     $session->param(-name=>'l_name', -value=>'Ruzmetov');
       
    48 
       
    49     # flush the data from memory to the storage driver at least before your
       
    50     # program finishes since auto-flushing can be unreliable
       
    51     $session->flush();
       
    52 
       
    53     # retrieving data
       
    54     my $f_name = $session->param('f_name');
       
    55     # or
       
    56     my $l_name = $session->param(-name=>'l_name');
       
    57 
       
    58     # clearing a certain session parameter
       
    59     $session->clear(["l_name", "f_name"]);
       
    60 
       
    61     # expire '_is_logged_in' flag after 10 idle minutes:
       
    62     $session->expire('is_logged_in', '+10m')
       
    63 
       
    64     # expire the session itself after 1 idle hour
       
    65     $session->expire('+1h');
       
    66 
       
    67     # delete the session for good
       
    68     $session->delete();
       
    69 
       
    70 =head1 DESCRIPTION
       
    71 
       
    72 CGI-Session is a Perl5 library that provides an easy, reliable and modular session management system across HTTP requests.
       
    73 Persistency is a key feature for such applications as shopping carts, login/authentication routines, and application that
       
    74 need to carry data across HTTP requests. CGI::Session does that and many more.
       
    75 
       
    76 =head1 TRANSLATIONS
       
    77 
       
    78 This document is also available in Japanese.
       
    79 
       
    80 =over 4
       
    81 
       
    82 =item o 
       
    83 
       
    84 Translation based on 4.14: http://digit.que.ne.jp/work/index.cgi?Perldoc/ja
       
    85 
       
    86 =item o
       
    87 
       
    88 Translation based on 3.11, including Cookbook and Tutorial: http://perldoc.jp/docs/modules/CGI-Session-3.11/
       
    89 
       
    90 =back
       
    91 
       
    92 =head1 TO LEARN MORE
       
    93 
       
    94 Current manual is optimized to be used as a quick reference. To learn more both about the philosophy and CGI::Session
       
    95 programming style, consider the following:
       
    96 
       
    97 =over 4
       
    98 
       
    99 =item *
       
   100 
       
   101 L<CGI::Session::Tutorial|CGI::Session::Tutorial> - extended CGI::Session manual. Also includes library architecture and driver specifications.
       
   102 
       
   103 =item *
       
   104 
       
   105 We also provide mailing lists for CGI::Session users. To subscribe to the list or browse the archives visit https://lists.sourceforge.net/lists/listinfo/cgi-session-user
       
   106 
       
   107 =item *
       
   108 
       
   109 B<RFC 2965> - "HTTP State Management Mechanism" found at ftp://ftp.isi.edu/in-notes/rfc2965.txt
       
   110 
       
   111 =item *
       
   112 
       
   113 L<CGI|CGI> - standard CGI library
       
   114 
       
   115 =item *
       
   116 
       
   117 L<Apache::Session|Apache::Session> - another fine alternative to CGI::Session.
       
   118 
       
   119 =back
       
   120 
       
   121 =head1 METHODS
       
   122 
       
   123 Following is the overview of all the available methods accessible via CGI::Session object.
       
   124 
       
   125 =head2 new()
       
   126 
       
   127 =head2 new( $sid )
       
   128 
       
   129 =head2 new( $query )
       
   130 
       
   131 =head2 new( $dsn, $query||$sid )
       
   132 
       
   133 =head2 new( $dsn, $query||$sid, \%dsn_args )
       
   134 
       
   135 Constructor. Returns new session object, or undef on failure. Error message is accessible through L<errstr() - class method|CGI::Session::ErrorHandler/errstr>. If called on an already initialized session will re-initialize the session based on already configured object. This is only useful after a call to L<load()|/"load">.
       
   136 
       
   137 Can accept up to three arguments, $dsn - Data Source Name, $query||$sid - query object OR a string representing session id, and finally, \%dsn_args, arguments used by $dsn components.
       
   138 
       
   139 If called without any arguments, $dsn defaults to I<driver:file;serializer:default;id:md5>, $query||$sid defaults to C<< CGI->new() >>, and C<\%dsn_args> defaults to I<undef>.
       
   140 
       
   141 If called with a single argument, it will be treated either as C<$query> object, or C<$sid>, depending on its type. If argument is a string , C<new()> will treat it as session id and will attempt to retrieve the session from data store. If it fails, will create a new session id, which will be accessible through L<id() method|/"id">. If argument is an object, L<cookie()|CGI/cookie> and L<param()|CGI/param> methods will be called on that object to recover a potential C<$sid> and retrieve it from data store. If it fails, C<new()> will create a new session id, which will be accessible through L<id() method|/"id">. C<name()> will define the name of the query parameter and/or cookie name to be requested, defaults to I<CGISESSID>.
       
   142 
       
   143 If called with two arguments first will be treated as $dsn, and second will be treated as $query or $sid or undef, depending on its type. Some examples of this syntax are:
       
   144 
       
   145     $s = CGI::Session->new("driver:mysql", undef);
       
   146     $s = CGI::Session->new("driver:sqlite", $sid);
       
   147     $s = CGI::Session->new("driver:db_file", $query);
       
   148     $s = CGI::Session->new("serializer:storable;id:incr", $sid);
       
   149     # etc...
       
   150 
       
   151 
       
   152 Following data source components are supported:
       
   153 
       
   154 =over 4
       
   155 
       
   156 =item *
       
   157 
       
   158 B<driver> - CGI::Session driver. Available drivers are L<file|CGI::Session::Driver::file>, L<db_file|CGI::Session::Driver::db_file>, L<mysql|CGI::Session::Driver::mysql> and L<sqlite|CGI::Session::Driver::sqlite>. Third party drivers are welcome. For driver specs consider L<CGI::Session::Driver|CGI::Session::Driver>
       
   159 
       
   160 =item *
       
   161 
       
   162 B<serializer> - serializer to be used to encode the data structure before saving
       
   163 in the disk. Available serializers are L<storable|CGI::Session::Serialize::storable>, L<freezethaw|CGI::Session::Serialize::freezethaw> and L<default|CGI::Session::Serialize::default>. Default serializer will use L<Data::Dumper|Data::Dumper>.
       
   164 
       
   165 =item *
       
   166 
       
   167 B<id> - ID generator to use when new session is to be created. Available ID generator is L<md5|CGI::Session::ID::md5>
       
   168 
       
   169 =back
       
   170 
       
   171 For example, to get CGI::Session store its data using DB_File and serialize data using FreezeThaw:
       
   172 
       
   173     $s = new CGI::Session("driver:DB_File;serializer:FreezeThaw", undef);
       
   174 
       
   175 If called with three arguments, first two will be treated as in the previous example, and third argument will be C<\%dsn_args>, which will be passed to C<$dsn> components (namely, driver, serializer and id generators) for initialization purposes. Since all the $dsn components must initialize to some default value, this third argument should not be required for most drivers to operate properly.
       
   176 
       
   177 undef is acceptable as a valid placeholder to any of the above arguments, which will force default behavior.
       
   178 
       
   179 =head2 load()
       
   180 
       
   181 =head2 load($query||$sid)
       
   182 
       
   183 =head2 load($dsn, $query||$sid)
       
   184 
       
   185 =head2 load($dsn, $query, \%dsn_args);
       
   186 
       
   187 Accepts the same arguments as new(), and also returns a new session object, or
       
   188 undef on failure.  The difference is, L<new()|/"new"> can create new session if
       
   189 it detects expired and non-existing sessions, but C<load()> does not.
       
   190 
       
   191 C<load()> is useful to detect expired or non-existing sessions without forcing the library to create new sessions. So now you can do something like this:
       
   192 
       
   193     $s = CGI::Session->load() or die CGI::Session->errstr();
       
   194     if ( $s->is_expired ) {
       
   195         print $s->header(),
       
   196             $cgi->start_html(),
       
   197             $cgi->p("Your session timed out! Refresh the screen to start new session!")
       
   198             $cgi->end_html();
       
   199         exit(0);
       
   200     }
       
   201 
       
   202     if ( $s->is_empty ) {
       
   203         $s = $s->new() or die $s->errstr;
       
   204     }
       
   205 
       
   206 Notice, all I<expired> sessions are empty, but not all I<empty> sessions are expired!
       
   207 
       
   208 
       
   209 =head2 id()
       
   210 
       
   211 Returns effective ID for a session. Since effective ID and claimed ID can differ, valid session id should always
       
   212 be retrieved using this method.
       
   213 
       
   214 =head2 param($name)
       
   215 
       
   216 =head2 param(-name=E<gt>$name)
       
   217 
       
   218 Used in either of the above syntax returns a session parameter set to $name or undef if it doesn't exist. If it's called on a deleted method param() will issue a warning but return value is not defined.
       
   219 
       
   220 =head2 param($name, $value)
       
   221 
       
   222 =head2 param(-name=E<gt>$name, -value=E<gt>$value)
       
   223 
       
   224 Used in either of the above syntax assigns a new value to $name parameter,
       
   225 which can later be retrieved with previously introduced param() syntax. C<$value>
       
   226 may be a scalar, arrayref or hashref.
       
   227 
       
   228 Attempts to set parameter names that start with I<_SESSION_> will trigger
       
   229 a warning and undef will be returned.
       
   230 
       
   231 =head2 param_hashref()
       
   232 
       
   233 B<Deprecated>. Use L<dataref()|/"dataref"> instead.
       
   234 
       
   235 =head2 dataref()
       
   236 
       
   237 Returns reference to session's data table:
       
   238 
       
   239     $params = $s->dataref();
       
   240     $sid = $params->{_SESSION_ID};
       
   241     $name= $params->{name};
       
   242     # etc...
       
   243 
       
   244 Useful for having all session data in a hashref, but too risky to update.
       
   245 
       
   246 =head2 save_param()
       
   247 
       
   248 =head2 save_param($query)
       
   249 
       
   250 =head2 save_param($query, \@@list)
       
   251 
       
   252 Saves query parameters to session object. In other words, it's the same as calling L<param($name, $value)|/"param"> for every single query parameter returned by C<< $query->param() >>. The first argument, if present, should be either CGI object or any object which can provide param() method. If it's undef, defaults to the return value of L<query()|/"query">, which returns C<< CGI->new >>. If second argument is present and is a reference to an array, only those query parameters found in the array will be stored in the session. undef is a valid placeholder for any argument to force default behavior.
       
   253 
       
   254 =head2 load_param()
       
   255 
       
   256 =head2 load_param($query)
       
   257 
       
   258 =head2 load_param($query, \@@list)
       
   259 
       
   260 Loads session parameters into a query object. The first argument, if present, should be query object, or any other object which can provide param() method. If second argument is present and is a reference to an array, only parameters found in that array will be loaded to the query object.
       
   261 
       
   262 =head2 clear()
       
   263 
       
   264 =head2 clear('field')
       
   265 
       
   266 =head2 clear(\@@list)
       
   267 
       
   268 Clears parameters from the session object.
       
   269 
       
   270 With no parameters, all fields are cleared. If passed a single parameter or a
       
   271 reference to an array, only the named parameters are cleared.
       
   272 
       
   273 =head2 flush()
       
   274 
       
   275 Synchronizes data in memory  with the copy serialized by the driver. Call flush() 
       
   276 if you need to access the session from outside the current session object. You should
       
   277 at least call flush() before your program exits. 
       
   278 
       
   279 As a last resort, CGI::Session will automatically call flush for you just
       
   280 before the program terminates or session object goes out of scope. This automatic
       
   281 behavior was the recommended behavior until the 4.x series. Automatic flushing
       
   282 has since proven to be unreliable, and in some cases is now required in places
       
   283 that worked with 3.x. For further details see:
       
   284 
       
   285  http://rt.cpan.org/Ticket/Display.html?id=17541
       
   286  http://rt.cpan.org/Ticket/Display.html?id=17299
       
   287 
       
   288 =head2 atime()
       
   289 
       
   290 Read-only method. Returns the last access time of the session in seconds from epoch. This time is used internally while
       
   291 auto-expiring sessions and/or session parameters.
       
   292 
       
   293 =head2 ctime()
       
   294 
       
   295 Read-only method. Returns the time when the session was first created in seconds from epoch.
       
   296 
       
   297 =head2 expire()
       
   298 
       
   299 =head2 expire($time)
       
   300 
       
   301 =head2 expire($param, $time)
       
   302 
       
   303 Sets expiration interval relative to L<atime()|/"atime">.
       
   304 
       
   305 If used with no arguments, returns the expiration interval if it was ever set. If no expiration was ever set, returns undef. For backwards compatibility, a method named C<etime()> does the same thing.
       
   306 
       
   307 Second form sets an expiration time. This value is checked when previously stored session is asked to be retrieved, and if its expiration interval has passed, it will be expunged from the disk immediately. Passing 0 cancels expiration.
       
   308 
       
   309 By using the third syntax you can set the expiration interval for a particular
       
   310 session parameter, say I<~logged-in>. This would cause the library call clear()
       
   311 on the parameter when its time is up. Note it only makes sense to set this value to 
       
   312 something I<earlier> than when the whole session expires.  Passing 0 cancels expiration.
       
   313 
       
   314 All the time values should be given in the form of seconds. Following keywords are also supported for your convenience:
       
   315 
       
   316     +-----------+---------------+
       
   317     |   alias   |   meaning     |
       
   318     +-----------+---------------+
       
   319     |     s     |   Second      |
       
   320     |     m     |   Minute      |
       
   321     |     h     |   Hour        |
       
   322     |     d     |   Day         |
       
   323     |     w     |   Week        |
       
   324     |     M     |   Month       |
       
   325     |     y     |   Year        |
       
   326     +-----------+---------------+
       
   327 
       
   328 Examples:
       
   329 
       
   330     $session->expire("2h");                # expires in two hours
       
   331     $session->expire(0);                   # cancel expiration
       
   332     $session->expire("~logged-in", "10m"); # expires '~logged-in' parameter after 10 idle minutes
       
   333 
       
   334 Note: all the expiration times are relative to session's last access time, not to its creation time. To expire a session immediately, call L<delete()|/"delete">. To expire a specific session parameter immediately, call L<clear([$name])|/"clear">.
       
   335 
       
   336 
       
   337 =head2 is_new()
       
   338 
       
   339 Returns true only for a brand new session.
       
   340 
       
   341 =head2 is_expired()
       
   342 
       
   343 Tests whether session initialized using L<load()|/"load"> is to be expired. This method works only on sessions initialized with load():
       
   344 
       
   345     $s = CGI::Session->load() or die CGI::Session->errstr;
       
   346     if ( $s->is_expired ) {
       
   347         die "Your session expired. Please refresh";
       
   348     }
       
   349     if ( $s->is_empty ) {
       
   350         $s = $s->new() or die $s->errstr;
       
   351     }
       
   352 
       
   353 
       
   354 =head2 is_empty()
       
   355 
       
   356 Returns true for sessions that are empty. It's preferred way of testing whether requested session was loaded successfully or not:
       
   357 
       
   358     $s = CGI::Session->load($sid);
       
   359     if ( $s->is_empty ) {
       
   360         $s = $s->new();
       
   361     }
       
   362 
       
   363 Actually, the above code is nothing but waste. The same effect could've been achieved by saying:
       
   364 
       
   365     $s = CGI::Session->new( $sid );
       
   366 
       
   367 L<is_empty()|/"is_empty"> is useful only if you wanted to catch requests for expired sessions, and create new session afterwards. See L<is_expired()|/"is_expired"> for an example.
       
   368 
       
   369 =head2 delete()
       
   370 
       
   371 Deletes a session from the data store and empties session data from memory, completely, so subsequent read/write requests on the same object will fail. Technically speaking, it will only set object's status to I<STATUS_DELETED> and will trigger L<flush()|/"flush">, and flush() will do the actual removal.
       
   372 
       
   373 =head2 find( \&code )
       
   374 
       
   375 =head2 find( $dsn, \&code )
       
   376 
       
   377 =head2 find( $dsn, \&code, \%dsn_args )
       
   378 
       
   379 Experimental feature. Executes \&code for every session object stored in disk, passing initialized CGI::Session object as the first argument of \&code. Useful for housekeeping purposes, such as for removing expired sessions. Following line, for instance, will remove sessions already expired, but are still in disk:
       
   380 
       
   381 The following line, for instance, will remove sessions already expired, but which are still on disk:
       
   382 
       
   383     CGI::Session->find( sub {} );
       
   384 
       
   385 Notice, above \&code didn't have to do anything, because load(), which is called to initialize sessions inside find(), will automatically remove expired sessions. Following example will remove all the objects that are 10+ days old:
       
   386 
       
   387     CGI::Session->find( \&purge );
       
   388     sub purge {
       
   389         my ($session) = @@_;
       
   390         next if $session->is_empty;    # <-- already expired?!
       
   391         if ( ($session->ctime + 3600*240) <= time() ) {
       
   392             $session->delete() or warn "couldn't remove " . $session->id . ": " . $session->errstr;
       
   393         }
       
   394     }
       
   395 
       
   396 B<Note>: find will not change the modification or access times on the sessions it returns.
       
   397 
       
   398 Explanation of the 3 parameters to C<find()>:
       
   399 
       
   400 =over 4
       
   401 
       
   402 =item $dsn
       
   403 
       
   404 This is the DSN (Data Source Name) used by CGI::Session to control what type of
       
   405 sessions you previously created and what type of sessions you now wish method
       
   406 C<find()> to pass to your callback.
       
   407 
       
   408 The default value is defined above, in the docs for method C<new()>, and is
       
   409 'driver:file;serializer:default;id:md5'.
       
   410 
       
   411 Do not confuse this DSN with the DSN arguments mentioned just below, under \%dsn_args.
       
   412 
       
   413 =item \&code
       
   414 
       
   415 This is the callback provided by you (i.e. the caller of method C<find()>)
       
   416 which is called by CGI::Session once for each session found by method C<find()>
       
   417 which matches the given $dsn.
       
   418 
       
   419 There is no default value for this coderef.
       
   420 
       
   421 When your callback is actually called, the only parameter is a session. If you
       
   422 want to call a subroutine you already have with more parameters, you can
       
   423 achieve this by creating an anonymous subroutine that calls your subroutine
       
   424 with the parameters you want. For example:
       
   425 
       
   426     CGI::Session->find($dsn, sub { my_subroutine( @@_, 'param 1', 'param 2' ) } );
       
   427     CGI::Session->find($dsn, sub { $coderef->( @@_, $extra_arg ) } );
       
   428     
       
   429 Or if you wish, you can define a sub generator as such:
       
   430 
       
   431     sub coderef_with_args {
       
   432         my ( $coderef, @@params ) = @@_;
       
   433         return sub { $coderef->( @@_, @@params ) };
       
   434     }
       
   435     
       
   436     CGI::Session->find($dsn, coderef_with_args( $coderef, 'param 1', 'param 2' ) );
       
   437 
       
   438 =item \%dsn_args
       
   439 
       
   440 If your $dsn uses file-based storage, then this hashref might contain keys such as:
       
   441 
       
   442     {
       
   443         Directory => Value 1,
       
   444         NoFlock   => Value 2,
       
   445         UMask     => Value 3
       
   446     }
       
   447 
       
   448 If your $dsn uses db-based storage, then this hashref contains (up to) 3 keys, and looks like:
       
   449 
       
   450     {
       
   451         DataSource => Value 1,
       
   452         User       => Value 2,
       
   453         Password   => Value 3
       
   454     }
       
   455 
       
   456 These 3 form the DSN, username and password used by DBI to control access to your database server,
       
   457 and hence are only relevant when using db-based sessions.
       
   458 
       
   459 The default value of this hashref is undef.
       
   460 
       
   461 =back
       
   462 
       
   463 B<Note:> find() is meant to be convenient, not necessarily efficient. It's best suited in cron scripts.
       
   464 
       
   465 =head1 MISCELLANEOUS METHODS
       
   466 
       
   467 =head2 remote_addr()
       
   468 
       
   469 Returns the remote address of the user who created the session for the first time. Returns undef if variable REMOTE_ADDR wasn't present in the environment when the session was created.
       
   470 
       
   471 
       
   472 =head2 errstr()
       
   473 
       
   474 Class method. Returns last error message from the library.
       
   475 
       
   476 =head2 dump()
       
   477 
       
   478 Returns a dump of the session object. Useful for debugging purposes only.
       
   479 
       
   480 =head2 header()
       
   481 
       
   482 Replacement for L<CGI.pm|CGI>'s header() method. Without this method, you usually need to create a CGI::Cookie object and send it as part of the HTTP header:
       
   483 
       
   484     $cookie = CGI::Cookie->new(-name=>$session->name, -value=>$session->id);
       
   485     print $cgi->header(-cookie=>$cookie);
       
   486 
       
   487 You can minimize the above into:
       
   488 
       
   489     print $session->header();
       
   490 
       
   491 It will retrieve the name of the session cookie from C<$session->name()> which defaults to C<$CGI::Session::NAME>. If you want to use a different name for your session cookie, do something like following before creating session object:
       
   492 
       
   493     CGI::Session->name("MY_SID");
       
   494     $session = new CGI::Session(undef, $cgi, \%attrs);
       
   495 
       
   496 Now, $session->header() uses "MY_SID" as a name for the session cookie.
       
   497 
       
   498 =head2 query()
       
   499 
       
   500 Returns query object associated with current session object. Default query object class is L<CGI.pm|CGI>.
       
   501 
       
   502 =head2 DEPRECATED METHODS
       
   503 
       
   504 These methods exist solely for for compatibility with CGI::Session 3.x.
       
   505 
       
   506 =head3 close()
       
   507 
       
   508 Closes the session. Using flush() is recommended instead, since that's exactly what a call
       
   509 to close() does now.
       
   510 
       
   511 =head1 DISTRIBUTION
       
   512 
       
   513 CGI::Session consists of several components such as L<drivers|"DRIVERS">, L<serializers|"SERIALIZERS"> and L<id generators|"ID GENERATORS">. This section lists what is available.
       
   514 
       
   515 =head2 DRIVERS
       
   516 
       
   517 Following drivers are included in the standard distribution:
       
   518 
       
   519 =over 4
       
   520 
       
   521 =item *
       
   522 
       
   523 L<file|CGI::Session::Driver::file> - default driver for storing session data in plain files. Full name: B<CGI::Session::Driver::file>
       
   524 
       
   525 =item *
       
   526 
       
   527 L<db_file|CGI::Session::Driver::db_file> - for storing session data in BerkelyDB. Requires: L<DB_File>.
       
   528 Full name: B<CGI::Session::Driver::db_file>
       
   529 
       
   530 =item *
       
   531 
       
   532 L<mysql|CGI::Session::Driver::mysql> - for storing session data in MySQL tables. Requires L<DBI|DBI> and L<DBD::mysql|DBD::mysql>.
       
   533 Full name: B<CGI::Session::Driver::mysql>
       
   534 
       
   535 =item *
       
   536 
       
   537 L<sqlite|CGI::Session::Driver::sqlite> - for storing session data in SQLite. Requires L<DBI|DBI> and L<DBD::SQLite|DBD::SQLite>.
       
   538 Full name: B<CGI::Session::Driver::sqlite>
       
   539 
       
   540 =back
       
   541 
       
   542 =head2 SERIALIZERS
       
   543 
       
   544 =over 4
       
   545 
       
   546 =item *
       
   547 
       
   548 L<default|CGI::Session::Serialize::default> - default data serializer. Uses standard L<Data::Dumper|Data::Dumper>.
       
   549 Full name: B<CGI::Session::Serialize::default>.
       
   550 
       
   551 =item *
       
   552 
       
   553 L<storable|CGI::Session::Serialize::storable> - serializes data using L<Storable>. Requires L<Storable>.
       
   554 Full name: B<CGI::Session::Serialize::storable>.
       
   555 
       
   556 =item *
       
   557 
       
   558 L<freezethaw|CGI::Session::Serialize::freezethaw> - serializes data using L<FreezeThaw>. Requires L<FreezeThaw>.
       
   559 Full name: B<CGI::Session::Serialize::freezethaw>
       
   560 
       
   561 =item *
       
   562 
       
   563 L<yaml|CGI::Session::Serialize::yaml> - serializes data using YAML. Requires L<YAML> or L<YAML::Syck>.
       
   564 Full name: B<CGI::Session::Serialize::yaml>
       
   565 
       
   566 =item *
       
   567 
       
   568 L<json|CGI::Session::Serialize::json> - serializes data using JSON. Requires L<JSON::Syck>.
       
   569 Full name: B<CGI::Session::Serialize::json>
       
   570 
       
   571 =back
       
   572 
       
   573 =head2 ID GENERATORS
       
   574 
       
   575 Following ID generators are available:
       
   576 
       
   577 =over 4
       
   578 
       
   579 =item *
       
   580 
       
   581 L<md5|CGI::Session::ID::md5> - generates 32 character long hexadecimal string. Requires L<Digest::MD5|Digest::MD5>.
       
   582 Full name: B<CGI::Session::ID::md5>.
       
   583 
       
   584 =item *
       
   585 
       
   586 L<incr|CGI::Session::ID::incr> - generates incremental session ids.
       
   587 
       
   588 =item *
       
   589 
       
   590 L<static|CGI::Session::ID::static> - generates static session ids. B<CGI::Session::ID::static>
       
   591 
       
   592 =back
       
   593 
       
   594 
       
   595 =head1 CREDITS
       
   596 
       
   597 CGI::Session evolved to what it is today with the help of following developers. The list doesn't follow any strict order, but somewhat chronological. Specifics can be found in F<Changes> file
       
   598 
       
   599 =over 4
       
   600 
       
   601 =item Andy Lester 
       
   602 
       
   603 =item Brian King E<lt>mrbbking@@mac.comE<gt>
       
   604 
       
   605 =item Olivier Dragon E<lt>dragon@@shadnet.shad.caE<gt>
       
   606 
       
   607 =item Adam Jacob E<lt>adam@@sysadminsith.orgE<gt>
       
   608 
       
   609 =item Igor Plisco E<lt>igor@@plisco.ruE<gt>
       
   610 
       
   611 =item Mark Stosberg 
       
   612 
       
   613 =item Matt LeBlanc E<lt>mleblanc@@cpan.orgE<gt>
       
   614 
       
   615 =item Shawn Sorichetti
       
   616 
       
   617 =back
       
   618 
       
   619 =head1 COPYRIGHT
       
   620 
       
   621 Copyright (C) 2001-2005 Sherzod Ruzmetov E<lt>sherzodr@@cpan.orgE<gt>. All rights reserved.
       
   622 This library is free software. You can modify and or distribute it under the same terms as Perl itself.
       
   623 
       
   624 =head1 PUBLIC CODE REPOSITORY
       
   625 
       
   626 You can see what the developers have been up to since the last release by
       
   627 checking out the code repository. You can browse the Subversion repository from here:
       
   628 
       
   629  http://svn.cromedome.net/
       
   630 
       
   631 Or check it directly with C<svn> from here:
       
   632 
       
   633  svn://svn.cromedome.net/CGI-Session
       
   634 
       
   635 =head1 SUPPORT
       
   636 
       
   637 If you need help using CGI::Session consider the mailing list. You can ask the list by sending your questions to
       
   638 cgi-session-user@@lists.sourceforge.net .
       
   639 
       
   640 You can subscribe to the mailing list at https://lists.sourceforge.net/lists/listinfo/cgi-session-user .
       
   641 
       
   642 Bug reports can be submitted at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Session
       
   643 
       
   644 =head1 AUTHOR
       
   645 
       
   646 Sherzod Ruzmetov E<lt>sherzodr@@cpan.orgE<gt>, http://author.handalak.com/
       
   647 
       
   648 Mark Stosberg became a co-maintainer during the development of 4.0. C<markstos@@cpan.org>.
       
   649 
       
   650 =head1 SEE ALSO
       
   651 
       
   652 =over 4
       
   653 
       
   654 =item *
       
   655 
       
   656 L<CGI::Session::Tutorial|CGI::Session::Tutorial> - extended CGI::Session manual
       
   657 
       
   658 =item *
       
   659 
       
   660 B<RFC 2965> - "HTTP State Management Mechanism" found at ftp://ftp.isi.edu/in-notes/rfc2965.txt
       
   661 
       
   662 =item *
       
   663 
       
   664 L<CGI|CGI> - standard CGI library
       
   665 
       
   666 =item *
       
   667 
       
   668 L<Apache::Session|Apache::Session> - another fine alternative to CGI::Session
       
   669 
       
   670 =back
       
   671 
       
   672 @