On 29/4/04 2:29 pm, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
> I'm playing with the callbacks, and decided to do a mass extinction on my
> directory, by doing a "search and delete" operation.
> So I try:
>
> my $res=$ldap->search(callback=\&myCallback);
>
> sub myCallback
> {
> my $mesg = shift;
> my $entry = shift;
>
> $entry->delete;
> $entry->update($ldap);
> printf "%5d) Deleted (%s)\n", $count, $entry->dn;
> }
>
> It kind of works, but it deletes only a part of the entries. :-(
> Why?
You're probably exceeding the server's limit on the number of search results
it is willing to send for a single op, ie the administrative sizelimit.
What result code do you get in $res?
There's no particularly robust solution except for repeating the search
until you've got nothing left to delete :-(
Cheers,
Chris