File: expire-sessions.pl

package info (click to toggle)
libcgi-session-expiresessions-perl 1.14-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 168 kB
  • sloc: perl: 274; makefile: 8
file content (25 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env perl

use strict;
use warnings;

use CGI::Session::ExpireSessions;
use DBI;

# -----------------------------------------------

my($dbh) = DBI -> connect
(
	'DBI:mysql:aussi:127.0.0.1',
	'root',
	'pass',
	{
		AutoCommit			=> 1,
		PrintError			=> 0,
		RaiseError			=> 1,
		ShowErrorStatement	=> 1,
	}
);

CGI::Session::ExpireSessions -> new(dbh => $dbh, verbose => 1) -> expire_db_sessions();
CGI::Session::ExpireSessions -> new(temp_dir => '/temp', verbose => 1) -> expire_file_sessions();