data/TWiki/CGISessionIDIncrDotPm.txt,v
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
colas@0
     1
head	1.1;
colas@0
     2
access;
colas@0
     3
symbols;
colas@0
     4
locks; strict;
colas@0
     5
comment	@# @;
colas@0
     6
colas@0
     7
colas@0
     8
1.1
colas@0
     9
date	2008.01.22.03.21.26;	author TWikiContributor;	state Exp;
colas@0
    10
branches;
colas@0
    11
next	;
colas@0
    12
colas@0
    13
colas@0
    14
desc
colas@0
    15
@buildrelease
colas@0
    16
@
colas@0
    17
colas@0
    18
colas@0
    19
1.1
colas@0
    20
log
colas@0
    21
@buildrelease
colas@0
    22
@
colas@0
    23
text
colas@0
    24
@---+ Package ==
colas@0
    25
*extends* <tt>CGI::Session::ErrorHandler </tt>
colas@0
    26
colas@0
    27
colas@0
    28
%TOC%
colas@0
    29
=head1 NAME
colas@0
    30
colas@0
    31
CGI::Session::ID::incr - CGI::Session ID driver
colas@0
    32
colas@0
    33
=head1 SYNOPSIS
colas@0
    34
colas@0
    35
    use CGI::Session;
colas@0
    36
    $session = new CGI::Session("id:Incr", undef, {
colas@0
    37
                                Directory   => '/tmp',
colas@0
    38
                                IDFile      => '/tmp/cgisession.id',
colas@0
    39
                                IDInit      => 1000,
colas@0
    40
                                IDIncr      => 2 });
colas@0
    41
colas@0
    42
=head1 DESCRIPTION
colas@0
    43
colas@0
    44
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.
colas@0
    45
colas@0
    46
=over 4
colas@0
    47
colas@0
    48
=item IDFile
colas@0
    49
colas@0
    50
Location where auto incremented IDs are stored. This attribute is required.
colas@0
    51
colas@0
    52
=item IDInit
colas@0
    53
colas@0
    54
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>.
colas@0
    55
colas@0
    56
=item IDIncr
colas@0
    57
colas@0
    58
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>.
colas@0
    59
colas@0
    60
=back
colas@0
    61
colas@0
    62
=head1 LICENSING
colas@0
    63
colas@0
    64
For support and licensing information see L<CGI::Session|CGI::Session>
colas@0
    65
colas@0
    66
@