CGI::Session::ID::static - CGI::Session ID Driver for generating static IDs
| Use Case | Command | Description |
|---|---|---|
| Create session with static ID (using driver:mysql) | CGI::Session->new('driver:mysql;id:static', $ENV{REMOTE_ADDR}, { Handle => $dbh }) | Creates a session with a static ID based on the remote address; ID is required. |
| Create session with static ID (using driver:file) | CGI::Session->new('driver:file;id:static', $custom_id) | Uses a provided custom ID (must be defined). |
| Error on undefined ID | CGI::Session->new('driver:file;id:static', undef) | Croaks if ID is undefined; static driver requires an explicit ID. |
use CGI::Session;
$session = CGI::Session->new( 'driver:mysql;id:static', $ENV{REMOTE_ADDR}, { Handle => $dbh } );
CGI::Session::ID::static is used to generate consistent, static session ID's. In other words, you tell CGI::Session ID you want to use, and it will honor it.
đ Unlike the other ID drivers, this one requires that you provide an ID when creating the session object; if you pass it an undefined value, it will croak.
Copyright (C) 2002 Adam Jacob <adam AT sysadminsith.org>,
This library is free software. You can modify and distribute it under the same terms as Perl itself.
Adam Jacob <adam AT sysadminsith.org>,
For additional support and licensing see CGI::Session
Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-08 10:33 @216.73.216.131
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format