/usr/share/perl5/Apache/Session/Generate/ModUniqueId.pm is in libapache-session-perl 1.93-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | package Apache::Session::Generate::ModUniqueId;
use strict;
use vars qw($VERSION);
$VERSION = '0.02';
sub generate {
my $session = shift;
unless (exists $ENV{UNIQUE_ID}) {
require Carp;
Carp::croak('Can\'t get UNIQUE_ID env variable. Make sure mod_unique_id is enabled.');
}
$session->{data}->{_session_id} = $ENV{UNIQUE_ID};
}
sub validate {
my $session = shift;
$session->{data}->{_session_id} =~ /^[A-Za-z0-9@\-]+$/
or die "invalid session id: $session->{data}->{_session_id}.";
}
1;
__END__
=head1 NAME
Apache::Session::Generate::ModUniqueId - mod_unique_id for session ID generation
=head1 SYNOPSIS
use Apache::Session::Flex;
tie %session, 'Apache::Session::Flex', $id, {
Store => 'MySQL',
Lock => 'Null',
Generate => 'ModUniqueId',
Serialize => 'Storable',
};
=head1 DESCRIPTION
Apache::Session::Generate::ModUniqueId enables you to use unique id
generated by mod_unique_id as session id for Apache::Session
framework. Using mod_unique_id would ensure higher level uniquess of
id.
=head1 AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=head1 SEE ALSO
L<Apache::Session>, L<Apache::Session::Flex>, mod_unique_id
=cut
|