data/TWiki/CGISessionIDIncrDotPm.txt
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
permissions -rw-r--r--
RELEASE 4.2.0 freetown
     1 ---+ Package ==
     2 *extends* <tt>CGI::Session::ErrorHandler </tt>
     3 
     4 
     5 %TOC%
     6 =head1 NAME
     7 
     8 CGI::Session::ID::incr - CGI::Session ID driver
     9 
    10 =head1 SYNOPSIS
    11 
    12     use CGI::Session;
    13     $session = new CGI::Session("id:Incr", undef, {
    14                                 Directory   => '/tmp',
    15                                 IDFile      => '/tmp/cgisession.id',
    16                                 IDInit      => 1000,
    17                                 IDIncr      => 2 });
    18 
    19 =head1 DESCRIPTION
    20 
    21 CGI::Session::ID::incr is to generate auto incrementing Session IDs. Compare it with L<CGI::Session::ID::md5|CGI::Session::ID::md5>, where session ids are truly random 32 character long strings. CGI::Session::ID::incr expects the following arguments passed to CGI::Session->new() as the third argument.
    22 
    23 =over 4
    24 
    25 =item IDFile
    26 
    27 Location where auto incremented IDs are stored. This attribute is required.
    28 
    29 =item IDInit
    30 
    31 Initial value of the ID if it's the first ID to be generated. For example, if you want the ID numbers to start with 1000 as opposed to 0, that's where you should set your value. Default is C<0>.
    32 
    33 =item IDIncr
    34 
    35 How many digits each number should increment by. For example, if you want the first generated id to start with 1000, and each subsequent id to increment by 10, set I<IDIncr> to 10 and I<IDInit> to 1000. Default is C<1>.
    36 
    37 =back
    38 
    39 =head1 LICENSING
    40 
    41 For support and licensing information see L<CGI::Session|CGI::Session>
    42