On 28/1/05 6:02 pm, Peter Marschall <[EMAIL PROTECTED]> wrote: > Hi, > > I'd like to add a write_version() routine to Net::LDAP::LDIF that writes the > version to the file (provded it is legal to do so) > If the routine is not called by the user, it should be called automatically > when writing the first entry (using the same logic that is used now for > writing the "version: 1" like)
It is sometimes useful to be able to write "incomplete" fragments of LDIF, so something like this would be useful. > To have a separate user-callable routine for this allows to write LDIF files > with comments before each entry like this one > > --- cut --- > version: 1 > > # the master of the directory > dn: cn=Boss,dc=sample,dc=local > objectclass ... > ... > > # his assistant > dn: cn=assictant, dc=sample,dc=local > ... > > # EOF > --- cut --- > > Any objections ? > (I'd like to start coding on Monday) Sounds OK to me. I'd imagine you'd have a callback that took the DN of the entry as an arg (or undef at EOF) and also the operation type (add/modify/delete/moddn). Cheers, Chris
