An alternative to add, delete,
and replace, in which the whole operation can be
given in a single argument. The argument should be a reference to an
ARRAY.
Values in the ARRAY are used in pairs; the first is the operation
add, delete, or
replace, and the second is a reference to an ARRAY
of attribute values.
The attribute value list is also used in pairs. The first value in
each pair is the attribute name, and the second is a reference to a
list of values.
Use this form if you want to control the order in which the
operations will be performed:
my $dn = q[uid=nvp,ou=People,o=my.domain];
$ldap->modify($dn, add => { sn => 'Patwardhan' } );
$ldap->modify($dn, delete => { 'weight' => '175' });
$ldap->modify($dn, replace => { 'loginShell' => '/usr/bin/tcsh' });
$ldap->modify( $dn,
changes => [
add => [ sn => 'Patwardhan' ],
delete => [ faxNumber => []],
delete => [ weight => ['175']],
replace => [ loginShell => '/usr/bin/tcsh']
]
);