CGI::Session::ID::static - CGI::Session ID Driver for generating static IDs
| Use Case | Command | Description |
|---|---|---|
| Create session with static ID from client IP | CGI::Session->new('driver:mysql;id:static', $ENV{REMOTE_ADDR}, { Handle => $dbh }) | Generates a session using the client's IP address as the static ID with a MySQL driver backend |
| Create session with custom static ID | CGI::Session->new('driver:file;id:static', 'my_custom_id') | Uses an arbitrary string as the static session ID with a file-based driver |
| Required ID validation | CGI::Session->new('driver:mysql;id:static', undef) | â ī¸ Will croak â a valid ID must be provided; this driver cannot generate one |
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 IDs. 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
perl v5.22.1 2016-01-15 CGI::Session::ID::static(3pm)
Generated by phpman v4.9.26-5-g7740029 Author: Che Dong Under GNU General Public License
2026-08-24 04:54 @216.73.216.102
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)