Chris Ridd wrote:
On 17/1/05 12:31 pm, ronan <[EMAIL PROTECTED]> wrote:
LDAP::NET LDAP::NETapi
the directory is using NETapi
can someone point me to a documet(s) where the differences betwween thsse
two modules are hightlighted
specifically in the writing of an entry to the directory...
I have created the entry and am attempting to write using NET::LDAP but
keep getting an error
failed to add entry: Object class violation at ./e2.pl line 87
the code is as follows
$list{'entry'} = {
'objectClass' => ['top','mjDistributionList'],
'cn' => ["AUT"],
'mj_admin_passwd' => ["apassword"],
'mj_moderate' => ['TRUE'],
'owner' => [$list_owner],
'description' => ["AUT mailing list"],
'mj_approve_passwd' => ["aut.approve"],
'mj_submit_policy' => ["restricted"],
'mj_subscribe_policy' => ["closed"],
'mj_restrict_post' => [EMAIL PROTECTED],
'mj_DLMembers' => []
};
$ret = $ldap->add(dn=>$dn,attrs => [EMAIL PROTECTED]'entry'}]);
if ($ret != LDAP_SUCCESS){
$ret->code && warn "failed to add entry: ", $ret->error ;
} else {
print "Added $rdn successfully\n";
};
Is there any difference in how the two modules wrap the entry before they
add to the directory??
I don't know anything about Net::LDAPapi. You'll need to seek help elsewhere
with that code!
You're obviously not running with perl's -w flag or using 'use strict'.
These are *strongly* recommended, because they point out errors in your
code. If you try to do that with your snippet it complains:
Global symbol "$list" requires explicit package name at ./test.pl line 20.
Execution of ./test.pl aborted due to compilation errors.
Line 20 in my test script is the line that calls add.
Does writing:
attrs => [%{$list{'entry'}}]
make a difference?
as before im not on the list so could any helpful souls please reply to
my email address.
Cheers,
Chris