support prefix list for bindir
[scpubgit/App-EzPz.git] / lib / Email / EzPz / ListCore.pm
index 9543e36..b91517d 100644 (file)
@@ -12,7 +12,11 @@ requires 'sublist_type';
 
 sub _command_path {
   my ($self, $command) = @_;
-  return io->dir($self->ezmlm_bindir)->catfile("ezmlm-${command}");
+  if (ref(my $bindir = $self->ezmlm_bindir) eq 'ARRAY') { # prefix list
+    return (@{$bindir}, "ezmlm-${command}");
+  } else {
+    return io->dir($bindir)->catfile("ezmlm-${command}");
+  }
 }
 
 sub _command_args {