From: Piotr R. <Pio...@ne...> - 2002-01-30 13:49:31
|
This simple test program produces strange LDIF file (starts with empty line and doesn't contains ending "-"). Why it is different than examples for OpenLDAP? #!/usr/bin/perl use Net::LDAP::Entry; use Net::LDAP::LDIF; use Data::Dumper; $entry = Net::LDAP::Entry->new(); $entry->changetype('modify'); $entry->dn('cn=test'); $entry->add( attr1 => 'value1', attr2 => [qw(value1 value2)] ); $entry->delete('attr3'); $entry->replace( attr4 => 'newvalue', attr5 => [qw(new values)] ); $ldif = Net::LDAP::LDIF->new("-", "w", encode=>'canonical'); $ldif->{change} = 1; $ldif->write_entry($entry); $ldif->done(); -- Piotr Roszatycki, Netia Telekom S.A. .''`. mailto:Pio...@ne... : :' : mailto:de...@de... `. `' `- |