diff --git a/lib/LDV.pm b/lib/LDV.pm index 1167fac..86b5208 100644 --- a/lib/LDV.pm +++ b/lib/LDV.pm @@ -16,6 +16,12 @@ sub startup { $self->app->mode('production'); $self->app->secret($self->app->config->{secret}); + $self->app->attr(email => sub { + require LDV::Email; + my $email = LDV::Email->new($self->app->config->{email} // {}); + return $email; + }); + $self->app->attr(ldap => sub { require LDV::LDAP; my $ldap = LDV::LDAP->new($self->app->config->{ldap});