From: Norbert K. <nor...@da...> - 2002-05-06 16:03:17
|
Hi, Net::LDAP::LDIF chokes on the following LDIF file: version: 1 dn: o=3Dtest objectclass: organization o: test It interpretes the version-spec as being an entry if followed by more than=20 one newline. This patch just reads the next entry if that is the case. --- /usr/lib/perl5/site_perl/5.6.1/Net/LDAP/LDIF.pm Tue Apr 23 12:57:09 = 2002 +++ LDIF.pm Mon May 6 17:22:36 2002 @@ -109,6 +109,10 @@ if (@ldif and $ldif[0] =3D~ /^version:\s+(\d+)/) { $self->{version} =3D $1; shift @ldif; + if (@ldif =3D=3D 0) { + @ldif =3D $self->_read_lines; + return unless @ldif; + } } if (@ldif <=3D 1) { P.S.: Besides LF, the line separator can also be CR LF. --=20 Dipl.-Inform. Norbert Klasen DAASI International GmbH phone: +49 7071 29 70336 Wilhelmstr. 106 fax: +49 7071 29 5114 72074 T=FCbingen email: nor...@da... Germany web: http://www.daasi.de |