I was using the Net::LDAP::LDIF to produce some LDIF's (obviously), and I was having trouble getting it to produce LDIF files in the modify format. After peeking around the source code, I worked my way around it via:


$ldif = Net::LDAP::LDIF->new("file.ldif", "w"); $ldif->{change} = 1; # force the change flag to be set

# muck with a Net::LDAP::Entry object, $entry

$ldif->write_entry($entry);



I am not positive that this is the appropriate way, but it was the only way I could get it to work. If this is the correct way to produce the desired behavior, it should probably be documented (including example code) in the LDIF.pod file. I can provide a patch to whomever necessary. Of course, I could be way off on this; so any pointers are appreciated.

Thanks,
Jeremy



Reply via email to