From 2d012119ab655e3cfba57f6d0cb6c53bc1d5ef93 Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Sat, 16 Jun 2018 21:10:12 +1000 Subject: [PATCH] + $self->app->db --- lib/LDV.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/LDV.pm b/lib/LDV.pm index 11770f7..02e2bf5 100644 --- a/lib/LDV.pm +++ b/lib/LDV.pm @@ -35,6 +35,13 @@ sub startup { return $ldap; }); + $self->app->attr(db => sub { + require LDV::DB; + my $db = LDV::DB->new($self->app->config->{db}); + $db->connect; + return $db; + }); + my $r = $self->routes; { # /user