X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FApp-EzPz.git;a=blobdiff_plain;f=lib%2FApp%2FEzPz%2FEzmlmConfig.pm;fp=lib%2FApp%2FEzPz%2FEzmlmConfig.pm;h=089f8a695e32d3ec317e00c9f0e6f717292d1133;hp=0000000000000000000000000000000000000000;hb=fda55d3e18008b847db5b383dc94e3fde8dcdf1e;hpb=bdab61a3b862017e4b56e242212b55a4e574be79 diff --git a/lib/App/EzPz/EzmlmConfig.pm b/lib/App/EzPz/EzmlmConfig.pm new file mode 100644 index 0000000..089f8a6 --- /dev/null +++ b/lib/App/EzPz/EzmlmConfig.pm @@ -0,0 +1,24 @@ +package App::EzPz::EzmlmConfig; + +use IO::All; +use Module::Runtime qw(use_module); +use Moo; + +has bindir => ( + is => 'ro', required => 1, +); + +has list_base_dir => ( + is => 'ro', required => 1, +); + +sub new_list_object { + my ($self, $args) = @_; + my $list_dir = io->dir($self->list_base_dir)->catdir($args->{list_name}); + use_module('Email::EzPz::List')->new( + list_dir => $list_dir, + ezmlm_bindir => $self->bindir, + ); +} + +1;