View Single Post
  #7   (View Single Post)  
Old 18th November 2008
stukov's Avatar
stukov stukov is offline
Real Name: Jean-Michel Philippon-Nadeau
Package Pilot
 
Join Date: May 2008
Location: Sherbrooke, Qc, Canada
Posts: 167
Default

Quote:
Originally Posted by ephemera View Post
i am not sure why they haven't used a hash reference. possibly for a small performance gain?
Maybe I can make the thing clearer: the array/hash I want to build will be given to the add method of the Perl::LDAP:

Code:
$ldapHandle->add($dn, attr => $attributes);
A function example looks like this:
Code:
$result = $ldap->add("uid=john,ou=People,dc=leapster,dc=org", 
                attr => [ 'cn' => 'John Smith',
                          'sn' => 'Smith',
                          'uid' => 'john',
                          'givenName' => 'John',
                          'homePhone' => '555-2020',
                          'mail' => 'john@domain.name',
                          'objectclass' => [ 'person', 'inetOrgPerson']
                        ]
           );
Am I expected to work with an array or an hash?
__________________
"Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction."
Reply With Quote