[Catalyst-commits] r8100 - in Catalyst-Authentication-Store-LDAP/trunk: . lib/Catalyst/Authentication/Store/LDAP

karpet at dev.catalyst.perl.org karpet at dev.catalyst.perl.org
Thu Jul 10 22:20:54 BST 2008


Author: karpet
Date: 2008-07-10 22:20:54 +0100 (Thu, 10 Jul 2008)
New Revision: 8100

Modified:
   Catalyst-Authentication-Store-LDAP/trunk/Changes
   Catalyst-Authentication-Store-LDAP/trunk/lib/Catalyst/Authentication/Store/LDAP/Backend.pm
Log:
get entries in array context rather than scalar context, allowing for multiple values. patch by scpham.

Modified: Catalyst-Authentication-Store-LDAP/trunk/Changes
===================================================================
--- Catalyst-Authentication-Store-LDAP/trunk/Changes	2008-07-10 00:35:17 UTC (rev 8099)
+++ Catalyst-Authentication-Store-LDAP/trunk/Changes	2008-07-10 21:20:54 UTC (rev 8100)
@@ -1,3 +1,8 @@
+0.1003 xxxx
+    - get entries in array context rather than scalar context, 
+      allowing for multiple values. patch by scpham.
+
+
 0.1002  9 July 2008
     - tests updated to use Net::LDAP::Server::Test 0.03
 

Modified: Catalyst-Authentication-Store-LDAP/trunk/lib/Catalyst/Authentication/Store/LDAP/Backend.pm
===================================================================
--- Catalyst-Authentication-Store-LDAP/trunk/lib/Catalyst/Authentication/Store/LDAP/Backend.pm	2008-07-10 00:35:17 UTC (rev 8099)
+++ Catalyst-Authentication-Store-LDAP/trunk/lib/Catalyst/Authentication/Store/LDAP/Backend.pm	2008-07-10 21:20:54 UTC (rev 8100)
@@ -395,14 +395,8 @@
     }
     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;
 }




More information about the Catalyst-commits mailing list