use absolute method rather than messing around with rel2abs
[scpubgit/App-EzPz.git] / lib / Email / EzPz / List.pm
CommitLineData
c5f4b6d4 1package Email::EzPz::List;
2
3use Module::Runtime qw(use_module);
4use Moo;
5
6with 'Email::EzPz::ListCore';
7
8sub sublist_type { () }
9
10foreach my $type (qw(allow deny mod digest)) {
11 has $type => (
12 is => 'ro',
13 lazy => 1,
14 default => sub { shift->_build_sublist($type) }
15 );
16}
17
18sub _build_sublist {
19 my ($self, $type) = @_;
20 return use_module('Email::EzPz::SubList')->new(
21 (map +($_ => $self->$_), qw(list_dir ezmlm_bindir)),
22 sublist_type => $type
23 );
24}
25
261;