CGI-kSession

 view release on metacpan or  search on metacpan

kSession.pm  view on Meta::CPAN

    return 1;
}

sub check_sessions {
    my $cl = shift;
    opendir(SD,$cl->{path});
    my @files = readdir(SD);
    shift @files;
    shift @files;
    foreach my $f (@files) {
	if (((stat($cl->{path}.$f))[9] + $cl->{lifetime}) < time()) { 
		unlink($cl->{path}.$f); 
		}
	}
    closedir(SD);
}

sub destroy {
    my $cl = shift;
    if (!$cl->have_id()) { return -1; }
    if (-e $cl->getfile()) { unlink($cl->getfile()); }



( run in 1.095 second using v1.01-cache-2.11-cpan-49f99fa48dc )