From 53510958053ca14714e04c6349a1224400e438bb Mon Sep 17 00:00:00 2001 From: Alex 'AdUser' Z Date: Wed, 26 Nov 2014 17:01:38 +1000 Subject: [PATCH] * LDV : reorder code --- lib/LDV.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/LDV.pm b/lib/LDV.pm index 1c66f45..1167fac 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(ldap => sub { + require LDV::LDAP; + my $ldap = LDV::LDAP->new($self->app->config->{ldap}); + return $ldap; + }); + my $r = $self->routes; # /user @@ -30,12 +36,6 @@ sub startup { $user->post('/create') ->to(action => 'create'); $user->post('/update') ->to(action => 'update'); - $self->app->attr(ldap => sub { - require LDV::LDAP; - my $ldap = LDV::LDAP->new($self->app->config->{ldap}); - return $ldap; - }); - # /zerobin my $zb = $r->route('/zerobin2') -> to(controller => 'zerobin'); $zb->post('/') -> to(action => 'save');