From: Graham B. <gb...@po...> - 2000-06-26 10:49:49
|
On Mon, Jun 26, 2000 at 12:29:35PM +0200, Bouarich, Reda wrote: > > Hello everyone, > I'm trying to update my DIT using an LDIF operation: > i'mn doing like the following: > > $ldif = Net::LDAP::LDIF->new("/usr/reda/LDIF/change.ldif", "w" ); > while( $entry = $ldif->write() ) { > print " \n\n EN COURS EN COURS EN COURS EN COURS \n\n"; > } > $ldif->done(); I think you have things backwards. You have opened the file for write (to the file) and are attempting to write nothing to it. Did you mean to open it for read and call $entry = $ldif->read() ?? > but it doesn't seem to work, i have the following error message: > > Can't locate object method "dn" via package "ENTRIES" at > lib/Net/LDAP/LDIF.pm line 167 Odd, LDIF.pm has no reference to ENTRIES. Did you perhaps pass the string 'ENTRIES' in as an argument to write ? Graham. |