data/TWiki/CGISessionDotPm.txt,v
changeset 0 414e01d06fd5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/data/TWiki/CGISessionDotPm.txt,v	Sat Jan 26 15:50:53 2008 +0100
     1.3 @@ -0,0 +1,672 @@
     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.31;	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 +*extends* <tt>CGI::Session::ErrorHandler </tt>
    1.29 +
    1.30 +
    1.31 +%TOC%
    1.32 +=head1 NAME
    1.33 +
    1.34 +CGI::Session - persistent session data in CGI applications
    1.35 +
    1.36 +=head1 SYNOPSIS
    1.37 +
    1.38 +    # Object initialization:
    1.39 +    use CGI::Session;
    1.40 +    $session = new CGI::Session();
    1.41 +
    1.42 +    $CGISESSID = $session->id();
    1.43 +
    1.44 +    # send proper HTTP header with cookies:
    1.45 +    print $session->header();
    1.46 +
    1.47 +    # storing data in the session
    1.48 +    $session->param('f_name', 'Sherzod');
    1.49 +    # or
    1.50 +    $session->param(-name=>'l_name', -value=>'Ruzmetov');
    1.51 +
    1.52 +    # flush the data from memory to the storage driver at least before your
    1.53 +    # program finishes since auto-flushing can be unreliable
    1.54 +    $session->flush();
    1.55 +
    1.56 +    # retrieving data
    1.57 +    my $f_name = $session->param('f_name');
    1.58 +    # or
    1.59 +    my $l_name = $session->param(-name=>'l_name');
    1.60 +
    1.61 +    # clearing a certain session parameter
    1.62 +    $session->clear(["l_name", "f_name"]);
    1.63 +
    1.64 +    # expire '_is_logged_in' flag after 10 idle minutes:
    1.65 +    $session->expire('is_logged_in', '+10m')
    1.66 +
    1.67 +    # expire the session itself after 1 idle hour
    1.68 +    $session->expire('+1h');
    1.69 +
    1.70 +    # delete the session for good
    1.71 +    $session->delete();
    1.72 +
    1.73 +=head1 DESCRIPTION
    1.74 +
    1.75 +CGI-Session is a Perl5 library that provides an easy, reliable and modular session management system across HTTP requests.
    1.76 +Persistency is a key feature for such applications as shopping carts, login/authentication routines, and application that
    1.77 +need to carry data across HTTP requests. CGI::Session does that and many more.
    1.78 +
    1.79 +=head1 TRANSLATIONS
    1.80 +
    1.81 +This document is also available in Japanese.
    1.82 +
    1.83 +=over 4
    1.84 +
    1.85 +=item o 
    1.86 +
    1.87 +Translation based on 4.14: http://digit.que.ne.jp/work/index.cgi?Perldoc/ja
    1.88 +
    1.89 +=item o
    1.90 +
    1.91 +Translation based on 3.11, including Cookbook and Tutorial: http://perldoc.jp/docs/modules/CGI-Session-3.11/
    1.92 +
    1.93 +=back
    1.94 +
    1.95 +=head1 TO LEARN MORE
    1.96 +
    1.97 +Current manual is optimized to be used as a quick reference. To learn more both about the philosophy and CGI::Session
    1.98 +programming style, consider the following:
    1.99 +
   1.100 +=over 4
   1.101 +
   1.102 +=item *
   1.103 +
   1.104 +L<CGI::Session::Tutorial|CGI::Session::Tutorial> - extended CGI::Session manual. Also includes library architecture and driver specifications.
   1.105 +
   1.106 +=item *
   1.107 +
   1.108 +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
   1.109 +
   1.110 +=item *
   1.111 +
   1.112 +B<RFC 2965> - "HTTP State Management Mechanism" found at ftp://ftp.isi.edu/in-notes/rfc2965.txt
   1.113 +
   1.114 +=item *
   1.115 +
   1.116 +L<CGI|CGI> - standard CGI library
   1.117 +
   1.118 +=item *
   1.119 +
   1.120 +L<Apache::Session|Apache::Session> - another fine alternative to CGI::Session.
   1.121 +
   1.122 +=back
   1.123 +
   1.124 +=head1 METHODS
   1.125 +
   1.126 +Following is the overview of all the available methods accessible via CGI::Session object.
   1.127 +
   1.128 +=head2 new()
   1.129 +
   1.130 +=head2 new( $sid )
   1.131 +
   1.132 +=head2 new( $query )
   1.133 +
   1.134 +=head2 new( $dsn, $query||$sid )
   1.135 +
   1.136 +=head2 new( $dsn, $query||$sid, \%dsn_args )
   1.137 +
   1.138 +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">.
   1.139 +
   1.140 +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.
   1.141 +
   1.142 +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>.
   1.143 +
   1.144 +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>.
   1.145 +
   1.146 +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:
   1.147 +
   1.148 +    $s = CGI::Session->new("driver:mysql", undef);
   1.149 +    $s = CGI::Session->new("driver:sqlite", $sid);
   1.150 +    $s = CGI::Session->new("driver:db_file", $query);
   1.151 +    $s = CGI::Session->new("serializer:storable;id:incr", $sid);
   1.152 +    # etc...
   1.153 +
   1.154 +
   1.155 +Following data source components are supported:
   1.156 +
   1.157 +=over 4
   1.158 +
   1.159 +=item *
   1.160 +
   1.161 +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>
   1.162 +
   1.163 +=item *
   1.164 +
   1.165 +B<serializer> - serializer to be used to encode the data structure before saving
   1.166 +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>.
   1.167 +
   1.168 +=item *
   1.169 +
   1.170 +B<id> - ID generator to use when new session is to be created. Available ID generator is L<md5|CGI::Session::ID::md5>
   1.171 +
   1.172 +=back
   1.173 +
   1.174 +For example, to get CGI::Session store its data using DB_File and serialize data using FreezeThaw:
   1.175 +
   1.176 +    $s = new CGI::Session("driver:DB_File;serializer:FreezeThaw", undef);
   1.177 +
   1.178 +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.
   1.179 +
   1.180 +undef is acceptable as a valid placeholder to any of the above arguments, which will force default behavior.
   1.181 +
   1.182 +=head2 load()
   1.183 +
   1.184 +=head2 load($query||$sid)
   1.185 +
   1.186 +=head2 load($dsn, $query||$sid)
   1.187 +
   1.188 +=head2 load($dsn, $query, \%dsn_args);
   1.189 +
   1.190 +Accepts the same arguments as new(), and also returns a new session object, or
   1.191 +undef on failure.  The difference is, L<new()|/"new"> can create new session if
   1.192 +it detects expired and non-existing sessions, but C<load()> does not.
   1.193 +
   1.194 +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:
   1.195 +
   1.196 +    $s = CGI::Session->load() or die CGI::Session->errstr();
   1.197 +    if ( $s->is_expired ) {
   1.198 +        print $s->header(),
   1.199 +            $cgi->start_html(),
   1.200 +            $cgi->p("Your session timed out! Refresh the screen to start new session!")
   1.201 +            $cgi->end_html();
   1.202 +        exit(0);
   1.203 +    }
   1.204 +
   1.205 +    if ( $s->is_empty ) {
   1.206 +        $s = $s->new() or die $s->errstr;
   1.207 +    }
   1.208 +
   1.209 +Notice, all I<expired> sessions are empty, but not all I<empty> sessions are expired!
   1.210 +
   1.211 +
   1.212 +=head2 id()
   1.213 +
   1.214 +Returns effective ID for a session. Since effective ID and claimed ID can differ, valid session id should always
   1.215 +be retrieved using this method.
   1.216 +
   1.217 +=head2 param($name)
   1.218 +
   1.219 +=head2 param(-name=E<gt>$name)
   1.220 +
   1.221 +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.
   1.222 +
   1.223 +=head2 param($name, $value)
   1.224 +
   1.225 +=head2 param(-name=E<gt>$name, -value=E<gt>$value)
   1.226 +
   1.227 +Used in either of the above syntax assigns a new value to $name parameter,
   1.228 +which can later be retrieved with previously introduced param() syntax. C<$value>
   1.229 +may be a scalar, arrayref or hashref.
   1.230 +
   1.231 +Attempts to set parameter names that start with I<_SESSION_> will trigger
   1.232 +a warning and undef will be returned.
   1.233 +
   1.234 +=head2 param_hashref()
   1.235 +
   1.236 +B<Deprecated>. Use L<dataref()|/"dataref"> instead.
   1.237 +
   1.238 +=head2 dataref()
   1.239 +
   1.240 +Returns reference to session's data table:
   1.241 +
   1.242 +    $params = $s->dataref();
   1.243 +    $sid = $params->{_SESSION_ID};
   1.244 +    $name= $params->{name};
   1.245 +    # etc...
   1.246 +
   1.247 +Useful for having all session data in a hashref, but too risky to update.
   1.248 +
   1.249 +=head2 save_param()
   1.250 +
   1.251 +=head2 save_param($query)
   1.252 +
   1.253 +=head2 save_param($query, \@@list)
   1.254 +
   1.255 +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.
   1.256 +
   1.257 +=head2 load_param()
   1.258 +
   1.259 +=head2 load_param($query)
   1.260 +
   1.261 +=head2 load_param($query, \@@list)
   1.262 +
   1.263 +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.
   1.264 +
   1.265 +=head2 clear()
   1.266 +
   1.267 +=head2 clear('field')
   1.268 +
   1.269 +=head2 clear(\@@list)
   1.270 +
   1.271 +Clears parameters from the session object.
   1.272 +
   1.273 +With no parameters, all fields are cleared. If passed a single parameter or a
   1.274 +reference to an array, only the named parameters are cleared.
   1.275 +
   1.276 +=head2 flush()
   1.277 +
   1.278 +Synchronizes data in memory  with the copy serialized by the driver. Call flush() 
   1.279 +if you need to access the session from outside the current session object. You should
   1.280 +at least call flush() before your program exits. 
   1.281 +
   1.282 +As a last resort, CGI::Session will automatically call flush for you just
   1.283 +before the program terminates or session object goes out of scope. This automatic
   1.284 +behavior was the recommended behavior until the 4.x series. Automatic flushing
   1.285 +has since proven to be unreliable, and in some cases is now required in places
   1.286 +that worked with 3.x. For further details see:
   1.287 +
   1.288 + http://rt.cpan.org/Ticket/Display.html?id=17541
   1.289 + http://rt.cpan.org/Ticket/Display.html?id=17299
   1.290 +
   1.291 +=head2 atime()
   1.292 +
   1.293 +Read-only method. Returns the last access time of the session in seconds from epoch. This time is used internally while
   1.294 +auto-expiring sessions and/or session parameters.
   1.295 +
   1.296 +=head2 ctime()
   1.297 +
   1.298 +Read-only method. Returns the time when the session was first created in seconds from epoch.
   1.299 +
   1.300 +=head2 expire()
   1.301 +
   1.302 +=head2 expire($time)
   1.303 +
   1.304 +=head2 expire($param, $time)
   1.305 +
   1.306 +Sets expiration interval relative to L<atime()|/"atime">.
   1.307 +
   1.308 +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.
   1.309 +
   1.310 +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.
   1.311 +
   1.312 +By using the third syntax you can set the expiration interval for a particular
   1.313 +session parameter, say I<~logged-in>. This would cause the library call clear()
   1.314 +on the parameter when its time is up. Note it only makes sense to set this value to 
   1.315 +something I<earlier> than when the whole session expires.  Passing 0 cancels expiration.
   1.316 +
   1.317 +All the time values should be given in the form of seconds. Following keywords are also supported for your convenience:
   1.318 +
   1.319 +    +-----------+---------------+
   1.320 +    |   alias   |   meaning     |
   1.321 +    +-----------+---------------+
   1.322 +    |     s     |   Second      |
   1.323 +    |     m     |   Minute      |
   1.324 +    |     h     |   Hour        |
   1.325 +    |     d     |   Day         |
   1.326 +    |     w     |   Week        |
   1.327 +    |     M     |   Month       |
   1.328 +    |     y     |   Year        |
   1.329 +    +-----------+---------------+
   1.330 +
   1.331 +Examples:
   1.332 +
   1.333 +    $session->expire("2h");                # expires in two hours
   1.334 +    $session->expire(0);                   # cancel expiration
   1.335 +    $session->expire("~logged-in", "10m"); # expires '~logged-in' parameter after 10 idle minutes
   1.336 +
   1.337 +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">.
   1.338 +
   1.339 +
   1.340 +=head2 is_new()
   1.341 +
   1.342 +Returns true only for a brand new session.
   1.343 +
   1.344 +=head2 is_expired()
   1.345 +
   1.346 +Tests whether session initialized using L<load()|/"load"> is to be expired. This method works only on sessions initialized with load():
   1.347 +
   1.348 +    $s = CGI::Session->load() or die CGI::Session->errstr;
   1.349 +    if ( $s->is_expired ) {
   1.350 +        die "Your session expired. Please refresh";
   1.351 +    }
   1.352 +    if ( $s->is_empty ) {
   1.353 +        $s = $s->new() or die $s->errstr;
   1.354 +    }
   1.355 +
   1.356 +
   1.357 +=head2 is_empty()
   1.358 +
   1.359 +Returns true for sessions that are empty. It's preferred way of testing whether requested session was loaded successfully or not:
   1.360 +
   1.361 +    $s = CGI::Session->load($sid);
   1.362 +    if ( $s->is_empty ) {
   1.363 +        $s = $s->new();
   1.364 +    }
   1.365 +
   1.366 +Actually, the above code is nothing but waste. The same effect could've been achieved by saying:
   1.367 +
   1.368 +    $s = CGI::Session->new( $sid );
   1.369 +
   1.370 +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.
   1.371 +
   1.372 +=head2 delete()
   1.373 +
   1.374 +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.
   1.375 +
   1.376 +=head2 find( \&code )
   1.377 +
   1.378 +=head2 find( $dsn, \&code )
   1.379 +
   1.380 +=head2 find( $dsn, \&code, \%dsn_args )
   1.381 +
   1.382 +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:
   1.383 +
   1.384 +The following line, for instance, will remove sessions already expired, but which are still on disk:
   1.385 +
   1.386 +    CGI::Session->find( sub {} );
   1.387 +
   1.388 +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:
   1.389 +
   1.390 +    CGI::Session->find( \&purge );
   1.391 +    sub purge {
   1.392 +        my ($session) = @@_;
   1.393 +        next if $session->is_empty;    # <-- already expired?!
   1.394 +        if ( ($session->ctime + 3600*240) <= time() ) {
   1.395 +            $session->delete() or warn "couldn't remove " . $session->id . ": " . $session->errstr;
   1.396 +        }
   1.397 +    }
   1.398 +
   1.399 +B<Note>: find will not change the modification or access times on the sessions it returns.
   1.400 +
   1.401 +Explanation of the 3 parameters to C<find()>:
   1.402 +
   1.403 +=over 4
   1.404 +
   1.405 +=item $dsn
   1.406 +
   1.407 +This is the DSN (Data Source Name) used by CGI::Session to control what type of
   1.408 +sessions you previously created and what type of sessions you now wish method
   1.409 +C<find()> to pass to your callback.
   1.410 +
   1.411 +The default value is defined above, in the docs for method C<new()>, and is
   1.412 +'driver:file;serializer:default;id:md5'.
   1.413 +
   1.414 +Do not confuse this DSN with the DSN arguments mentioned just below, under \%dsn_args.
   1.415 +
   1.416 +=item \&code
   1.417 +
   1.418 +This is the callback provided by you (i.e. the caller of method C<find()>)
   1.419 +which is called by CGI::Session once for each session found by method C<find()>
   1.420 +which matches the given $dsn.
   1.421 +
   1.422 +There is no default value for this coderef.
   1.423 +
   1.424 +When your callback is actually called, the only parameter is a session. If you
   1.425 +want to call a subroutine you already have with more parameters, you can
   1.426 +achieve this by creating an anonymous subroutine that calls your subroutine
   1.427 +with the parameters you want. For example:
   1.428 +
   1.429 +    CGI::Session->find($dsn, sub { my_subroutine( @@_, 'param 1', 'param 2' ) } );
   1.430 +    CGI::Session->find($dsn, sub { $coderef->( @@_, $extra_arg ) } );
   1.431 +    
   1.432 +Or if you wish, you can define a sub generator as such:
   1.433 +
   1.434 +    sub coderef_with_args {
   1.435 +        my ( $coderef, @@params ) = @@_;
   1.436 +        return sub { $coderef->( @@_, @@params ) };
   1.437 +    }
   1.438 +    
   1.439 +    CGI::Session->find($dsn, coderef_with_args( $coderef, 'param 1', 'param 2' ) );
   1.440 +
   1.441 +=item \%dsn_args
   1.442 +
   1.443 +If your $dsn uses file-based storage, then this hashref might contain keys such as:
   1.444 +
   1.445 +    {
   1.446 +        Directory => Value 1,
   1.447 +        NoFlock   => Value 2,
   1.448 +        UMask     => Value 3
   1.449 +    }
   1.450 +
   1.451 +If your $dsn uses db-based storage, then this hashref contains (up to) 3 keys, and looks like:
   1.452 +
   1.453 +    {
   1.454 +        DataSource => Value 1,
   1.455 +        User       => Value 2,
   1.456 +        Password   => Value 3
   1.457 +    }
   1.458 +
   1.459 +These 3 form the DSN, username and password used by DBI to control access to your database server,
   1.460 +and hence are only relevant when using db-based sessions.
   1.461 +
   1.462 +The default value of this hashref is undef.
   1.463 +
   1.464 +=back
   1.465 +
   1.466 +B<Note:> find() is meant to be convenient, not necessarily efficient. It's best suited in cron scripts.
   1.467 +
   1.468 +=head1 MISCELLANEOUS METHODS
   1.469 +
   1.470 +=head2 remote_addr()
   1.471 +
   1.472 +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.
   1.473 +
   1.474 +
   1.475 +=head2 errstr()
   1.476 +
   1.477 +Class method. Returns last error message from the library.
   1.478 +
   1.479 +=head2 dump()
   1.480 +
   1.481 +Returns a dump of the session object. Useful for debugging purposes only.
   1.482 +
   1.483 +=head2 header()
   1.484 +
   1.485 +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:
   1.486 +
   1.487 +    $cookie = CGI::Cookie->new(-name=>$session->name, -value=>$session->id);
   1.488 +    print $cgi->header(-cookie=>$cookie);
   1.489 +
   1.490 +You can minimize the above into:
   1.491 +
   1.492 +    print $session->header();
   1.493 +
   1.494 +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:
   1.495 +
   1.496 +    CGI::Session->name("MY_SID");
   1.497 +    $session = new CGI::Session(undef, $cgi, \%attrs);
   1.498 +
   1.499 +Now, $session->header() uses "MY_SID" as a name for the session cookie.
   1.500 +
   1.501 +=head2 query()
   1.502 +
   1.503 +Returns query object associated with current session object. Default query object class is L<CGI.pm|CGI>.
   1.504 +
   1.505 +=head2 DEPRECATED METHODS
   1.506 +
   1.507 +These methods exist solely for for compatibility with CGI::Session 3.x.
   1.508 +
   1.509 +=head3 close()
   1.510 +
   1.511 +Closes the session. Using flush() is recommended instead, since that's exactly what a call
   1.512 +to close() does now.
   1.513 +
   1.514 +=head1 DISTRIBUTION
   1.515 +
   1.516 +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.
   1.517 +
   1.518 +=head2 DRIVERS
   1.519 +
   1.520 +Following drivers are included in the standard distribution:
   1.521 +
   1.522 +=over 4
   1.523 +
   1.524 +=item *
   1.525 +
   1.526 +L<file|CGI::Session::Driver::file> - default driver for storing session data in plain files. Full name: B<CGI::Session::Driver::file>
   1.527 +
   1.528 +=item *
   1.529 +
   1.530 +L<db_file|CGI::Session::Driver::db_file> - for storing session data in BerkelyDB. Requires: L<DB_File>.
   1.531 +Full name: B<CGI::Session::Driver::db_file>
   1.532 +
   1.533 +=item *
   1.534 +
   1.535 +L<mysql|CGI::Session::Driver::mysql> - for storing session data in MySQL tables. Requires L<DBI|DBI> and L<DBD::mysql|DBD::mysql>.
   1.536 +Full name: B<CGI::Session::Driver::mysql>
   1.537 +
   1.538 +=item *
   1.539 +
   1.540 +L<sqlite|CGI::Session::Driver::sqlite> - for storing session data in SQLite. Requires L<DBI|DBI> and L<DBD::SQLite|DBD::SQLite>.
   1.541 +Full name: B<CGI::Session::Driver::sqlite>
   1.542 +
   1.543 +=back
   1.544 +
   1.545 +=head2 SERIALIZERS
   1.546 +
   1.547 +=over 4
   1.548 +
   1.549 +=item *
   1.550 +
   1.551 +L<default|CGI::Session::Serialize::default> - default data serializer. Uses standard L<Data::Dumper|Data::Dumper>.
   1.552 +Full name: B<CGI::Session::Serialize::default>.
   1.553 +
   1.554 +=item *
   1.555 +
   1.556 +L<storable|CGI::Session::Serialize::storable> - serializes data using L<Storable>. Requires L<Storable>.
   1.557 +Full name: B<CGI::Session::Serialize::storable>.
   1.558 +
   1.559 +=item *
   1.560 +
   1.561 +L<freezethaw|CGI::Session::Serialize::freezethaw> - serializes data using L<FreezeThaw>. Requires L<FreezeThaw>.
   1.562 +Full name: B<CGI::Session::Serialize::freezethaw>
   1.563 +
   1.564 +=item *
   1.565 +
   1.566 +L<yaml|CGI::Session::Serialize::yaml> - serializes data using YAML. Requires L<YAML> or L<YAML::Syck>.
   1.567 +Full name: B<CGI::Session::Serialize::yaml>
   1.568 +
   1.569 +=item *
   1.570 +
   1.571 +L<json|CGI::Session::Serialize::json> - serializes data using JSON. Requires L<JSON::Syck>.
   1.572 +Full name: B<CGI::Session::Serialize::json>
   1.573 +
   1.574 +=back
   1.575 +
   1.576 +=head2 ID GENERATORS
   1.577 +
   1.578 +Following ID generators are available:
   1.579 +
   1.580 +=over 4
   1.581 +
   1.582 +=item *
   1.583 +
   1.584 +L<md5|CGI::Session::ID::md5> - generates 32 character long hexadecimal string. Requires L<Digest::MD5|Digest::MD5>.
   1.585 +Full name: B<CGI::Session::ID::md5>.
   1.586 +
   1.587 +=item *
   1.588 +
   1.589 +L<incr|CGI::Session::ID::incr> - generates incremental session ids.
   1.590 +
   1.591 +=item *
   1.592 +
   1.593 +L<static|CGI::Session::ID::static> - generates static session ids. B<CGI::Session::ID::static>
   1.594 +
   1.595 +=back
   1.596 +
   1.597 +
   1.598 +=head1 CREDITS
   1.599 +
   1.600 +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
   1.601 +
   1.602 +=over 4
   1.603 +
   1.604 +=item Andy Lester 
   1.605 +
   1.606 +=item Brian King E<lt>mrbbking@@mac.comE<gt>
   1.607 +
   1.608 +=item Olivier Dragon E<lt>dragon@@shadnet.shad.caE<gt>
   1.609 +
   1.610 +=item Adam Jacob E<lt>adam@@sysadminsith.orgE<gt>
   1.611 +
   1.612 +=item Igor Plisco E<lt>igor@@plisco.ruE<gt>
   1.613 +
   1.614 +=item Mark Stosberg 
   1.615 +
   1.616 +=item Matt LeBlanc E<lt>mleblanc@@cpan.orgE<gt>
   1.617 +
   1.618 +=item Shawn Sorichetti
   1.619 +
   1.620 +=back
   1.621 +
   1.622 +=head1 COPYRIGHT
   1.623 +
   1.624 +Copyright (C) 2001-2005 Sherzod Ruzmetov E<lt>sherzodr@@cpan.orgE<gt>. All rights reserved.
   1.625 +This library is free software. You can modify and or distribute it under the same terms as Perl itself.
   1.626 +
   1.627 +=head1 PUBLIC CODE REPOSITORY
   1.628 +
   1.629 +You can see what the developers have been up to since the last release by
   1.630 +checking out the code repository. You can browse the Subversion repository from here:
   1.631 +
   1.632 + http://svn.cromedome.net/
   1.633 +
   1.634 +Or check it directly with C<svn> from here:
   1.635 +
   1.636 + svn://svn.cromedome.net/CGI-Session
   1.637 +
   1.638 +=head1 SUPPORT
   1.639 +
   1.640 +If you need help using CGI::Session consider the mailing list. You can ask the list by sending your questions to
   1.641 +cgi-session-user@@lists.sourceforge.net .
   1.642 +
   1.643 +You can subscribe to the mailing list at https://lists.sourceforge.net/lists/listinfo/cgi-session-user .
   1.644 +
   1.645 +Bug reports can be submitted at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Session
   1.646 +
   1.647 +=head1 AUTHOR
   1.648 +
   1.649 +Sherzod Ruzmetov E<lt>sherzodr@@cpan.orgE<gt>, http://author.handalak.com/
   1.650 +
   1.651 +Mark Stosberg became a co-maintainer during the development of 4.0. C<markstos@@cpan.org>.
   1.652 +
   1.653 +=head1 SEE ALSO
   1.654 +
   1.655 +=over 4
   1.656 +
   1.657 +=item *
   1.658 +
   1.659 +L<CGI::Session::Tutorial|CGI::Session::Tutorial> - extended CGI::Session manual
   1.660 +
   1.661 +=item *
   1.662 +
   1.663 +B<RFC 2965> - "HTTP State Management Mechanism" found at ftp://ftp.isi.edu/in-notes/rfc2965.txt
   1.664 +
   1.665 +=item *
   1.666 +
   1.667 +L<CGI|CGI> - standard CGI library
   1.668 +
   1.669 +=item *
   1.670 +
   1.671 +L<Apache::Session|Apache::Session> - another fine alternative to CGI::Session
   1.672 +
   1.673 +=back
   1.674 +
   1.675 +@