(no commit message)
[openafs-wiki.git] / TWiki / CGISessionIDIncrDotPm.mdwn
1 # <a name="Package &lt;code&gt;="></a> Package =
2
3 **extends** `CGI::Session::ErrorHandler `
4
5 <div>
6   <ul>
7     <li><a href="#Package =="> Package ==</a></li>
8   </ul>
9 </div>
10
11 =head1 NAME
12
13 CGI::Session::ID::incr - CGI::Session ID driver
14
15 =head1 SYNOPSIS
16
17 use CGI::Session; $session = new CGI::Session("id:Incr", undef, \{ Directory =&gt; '/tmp', IDFile =&gt; '/tmp/cgisession.id', IDInit =&gt; 1000, IDIncr =&gt; 2 \});
18
19 =head1 DESCRIPTION
20
21 CGI::Session::ID::incr is to generate auto incrementing Session IDs. Compare it with L&lt;CGI::Session::ID::md5|CGI::Session::ID::md5&gt;, where session ids are truly random 32 character long strings. CGI::Session::ID::incr expects the following arguments passed to CGI::Session-&gt;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&lt;0&gt;.
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 to 10 and I to 1000. Default is C&lt;1&gt;.
36
37 =back
38
39 =head1 LICENSING
40
41 For support and licensing information see L&lt;CGI::Session|CGI::Session&gt;