X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst%2FAuthentication%2FStore%2FLDAP%2FBackend.pm;h=b8977040f4b18588048c78a60b28c3ab499d594b;hb=ab62b426562470d4ffc97953ad15a3f5fca88008;hp=e70ca9669eb8cc3db8f04b5b4f3d80008d534589;hpb=1647b33a483e763b84e66450972826dd91608caf;p=catagits%2FCatalyst-Authentication-Store-LDAP.git diff --git a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm index e70ca96..b897704 100644 --- a/lib/Catalyst/Authentication/Store/LDAP/Backend.pm +++ b/lib/Catalyst/Authentication/Store/LDAP/Backend.pm @@ -78,7 +78,7 @@ use base qw( Class::Accessor::Fast ); use strict; use warnings; -our $VERSION = '0.1000'; +our $VERSION = '0.1002'; use Catalyst::Authentication::Store::LDAP::User; use Net::LDAP; @@ -395,14 +395,8 @@ sub lookup_roles { } my $rolesearch = $ldap->search(@searchopts); my @roles; -RESULT: while ( my $entry = $rolesearch->pop_entry ) { - my ($role) = $entry->get_value( $self->role_field ); - if ($role) { - push( @roles, $role ); - } - else { - next RESULT; - } +RESULT: foreach my $entry ( $rolesearch->entries ) { + push( @roles, $entry->get_value( $self->role_field ) ); } return @roles; }