/usr/share/perl5/Mail/MtPolicyd/SessionCache.pm is in mtpolicyd 2.02-3.
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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 | package Mail::MtPolicyd::SessionCache;
use Moose;
our $VERSION = '2.02'; # VERSION
# ABSTRACT: class for handling session cache
use Mail::MtPolicyd::SessionCache::None;
has 'server' => (
is => 'ro', isa => 'Net::Server', required => 1,
handles => {
'log' => 'log',
}
);
has 'cache' => (
is => 'rw', isa => 'Mail::MtPolicyd::SessionCache::Base',
lazy => 1,
default => sub { Mail::MtPolicyd::SessionCache::None->new },
handles => [
'retrieve_session', 'store_session', 'shutdown',
],
);
sub load_config {
my ( $self, $config ) = @_;
if( ! defined $config->{'module'} ) {
die('no module defined for SessionCache!');
}
my $module = $config->{'module'};
my $class = 'Mail::MtPolicyd::SessionCache::'.$module;
my $cache;
$self->log(1, 'loading SessionCache '.$module);
my $code = "require ".$class.";";
eval $code; ## no critic (ProhibitStringyEval)
if($@) {
die('could not load SessionCache '.$module.': '.$@);
}
$self->log(1, 'initializing SessionCache '.$module);
eval {
$cache = $class->new(
%$config,
);
$cache->init();
};
if($@) {
die('could not initialize SessionCache: '.$@);
}
$self->cache( $cache );
return;
}
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Mail::MtPolicyd::SessionCache - class for handling session cache
=head1 VERSION
version 2.02
=head1 AUTHOR
Markus Benning <ich@markusbenning.de>
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by Markus Benning <ich@markusbenning.de>.
This is free software, licensed under:
The GNU General Public License, Version 2, June 1991
=cut
|