use Scalar::Util 'blessed';
use Moo;
-has ezmlm_bindir => (is => 'ro', required => 1);
+has ezmlm_config => (
+ is => 'ro',
+ coerce => sub {
+ return $_[0] if blessed($_[0]);
+ return use_module('App::EzPz::EzmlmConfig')->new($_[0]);
+ }
+);
has htpasswd_file => (is => 'ro', required => 1);
my $htp_user = $user->_htpasswd_user;
$htp_file->add_user($htp_user);
$htp_user->file($htp_file);
- $user->_set_ezmlm_bindir($self->ezmlm_bindir);
+ $user->_set_ezmlm_config($self->ezmlm_config);
return $user;
}
my ($self, $htp_user) = @_;
return use_module('App::EzPz::User')->new(
htpasswd_user => $htp_user,
- ezmlm_bindir => $self->ezmlm_bindir,
+ ezmlm_config => $self->ezmlm_config,
);
}