Chris Ridd wrote:
> The separator is not optional according to RFC 2849:
---- change-modify = "modify" SEP *mod-spec
mod-spec = ("add:" / "delete:" / "replace:") FILL AttributeDescription SEP *attrval-spec "-" SEP ----
thanks for this information.
Which version of LDIF.pm are you using? 0.15_01 looks like it prints "-\n"
i've found 0.15 in my LDIF.pm, do i have to update ? or peraps i don't use perl-ldap correctly ?
here is a test :
use strict; use warnings; use Net::LDAP::LDIF; use Net::LDAP::Entry;
my $ldif = Net::LDAP::LDIF->new(
\*STDOUT , 'w' , onerror => 'die'
);my $e = Net::LDAP::Entry->new ;
$e->dn('cn=admin,dc=test');
$e->add(
changetype => 'modify'
, replace => 'sn'
, sn => 'toto'
);
$ldif->write_entry($e);
regards
