1 package Email::EzPz::ListCore;
5 use IPC::System::Simple qw(run capture);
7 has list_dir => (is => 'ro', required => 1);
9 has ezmlm_bindir => (is => 'ro', required => 1);
11 requires 'sublist_type';
14 my ($self, $command) = @_;
15 return io->dir($self->ezmlm_bindir)->catfile("ezmlm-${command}");
19 my ($self, $command, @args) = @_;
21 $self->_command_path($command),
29 my ($self, @cmd) = @_;
30 run $self->_command_args(@cmd);
33 sub _capture_command {
34 my ($self, @cmd) = @_;
35 map { chomp; $_ } capture $self->_command_args(@cmd);
39 my ($self, $member) = @_;
40 $self->_call_command(sub => $member);
45 my ($self, $member) = @_;
46 $self->_call_command(unsub => $member);
52 $self->_capture_command('list');