diff --git a/lib/LDV.pm b/lib/LDV.pm index 0b1c313..1c66f45 100644 --- a/lib/LDV.pm +++ b/lib/LDV.pm @@ -30,12 +30,19 @@ 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'); $zb->get ('/') -> to(action => 'create'); $zb->route('/:time', time => qr/\d+/) ->via('GET') -> to(action => 'view'); + my $root = $self->app->config->{zerobin}->{root}; mkdir $self->app->home->rel_dir($root); }