Subject: | Net::LDAP::LDIF |
Can't seem to get current_lines method to work latest versions of
LDIF.pm (0.17, 0.18) that come in Net::LDAP 0.34 - 0.39. Tested with
this simple code:
#!/usr/bin/perl
use Net::LDAP;
use Net::LDAP::Entry;
use Net::LDAP::LDIF;
my $HOME = $ENV{'HOME'};
my $infile = "$HOME/test.ldif" or die $!;
my $ldif = Net::LDAP::LDIF->new($infile,'r') or die $!;
while (not $ldif->eof() ) {
my $entry = $ldif->read_entry();
print $ldif->current_lines(), "\n";
print "\n";
}
$ldif->done;
__END__;
Data was standard compliant LDIF v1 (no comments) generated using
ldapsearch (OpenLDAP 2.4.11). After building LDIF.pm 0.16 from 0.33
distribution and copying over latest 0.18 that came with 0.39, was able
to see this code work.
I am running Ubuntu Linux 8.10 x86_64. Net::LDAP was installed from
cpan, not distro packages. Perl version is 5.10.0 from Ubuntu 8.10 base
install, with updates.