require the Net::LDAP module for all installs

This commit is contained in:
Oliver Gorwits
2014-02-22 12:10:30 +00:00
parent 2ed22d5d08
commit 8f5ee82cf7
4 changed files with 4 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ use Dancer ':syntax';
use Dancer::Plugin::DBIC;
use Dancer::Plugin::Passphrase;
use Digest::MD5;
use Net::LDAP;
sub authenticate_user {
my ($self, $username, $password) = @_;
@@ -99,9 +100,6 @@ sub match_with_local_pass {
sub match_with_ldap {
my($self, $pass, $user) = @_;
eval 'require Net::LDAP';
if ($@) {error $@; return}
return unless setting('ldap') and ref {} eq ref setting('ldap');
my $conf = setting('ldap');