From f023778623fc3fb2462337d7be832cb642348fa9 Mon Sep 17 00:00:00 2001 From: Sandro Cazzaniga Date: Fri, 21 Sep 2012 07:56:47 +0000 Subject: [PATCH] use splice() to have a clean code in methods --- lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_LDAP.pm | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_LDAP.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_LDAP.pm index fe6a44e59..6ab873cba 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_LDAP.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/_LDAP.pm @@ -415,11 +415,7 @@ sub ldap { # @param attributes to get from found groups (array ref) # @return string groups separated with multiValuesSeparator sub searchGroups { - my $self = shift; - my $base = shift; - my $key = shift; - my $value = shift; - my $attributes = shift; + my ($self, $base, $key, $value, $attributes) = splice @_; my $portal = $self->{portal}; my $groups; @@ -502,9 +498,7 @@ sub searchGroups { # @param attribute Attribute name # @return string value sub getLdapValue { - my $self = shift; - my $entry = shift; - my $attribute = shift; + my ($self, $entry, $attribute) = splice @_; return $entry->dn() if ( $attribute eq "dn" );