From 40a7bee8667eb91d072a47f4bab276a77d11e880 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Wed, 26 Nov 2014 17:03:04 +1000 Subject: [PATCH] * connect LDV::Email to app --- lib/LDV.pm | 6 ++++++ 1 file changed, 6 insertions(+) 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});