On 13/6/05 12:38, David Wood <[EMAIL PROTECTED]> wrote: > Hi folks, > > Just three comments on Net::LDAP::LDIF... > > 1) Using: > > my $load_ldif = Net::LDAP::LDIF->new($LOAD_FILE, "w", lowercase => 0, > wrap => 0); > ... > $entry->add("cellPhone" => "$phone_number"); # cellPhone with > upper-case "P" > ... > $yahoo_load_ldif->write_entry($entry); > > produces a line in the output file like: > > cellphone: ... # cellphone with lower-case "p" > > so either the "lowercase" arg to "new" isn't working correctly, or I'm > somehow using it incorrectly?
I think you're turning off lowercasing and wrapping. Try setting them to 1 instead ;-) > Further, to be honest I'm not sure whether either of these should be > considered bugs, but they might be worth handling: > > 2) When creating a new LDIF file with "w", no blank line is added after > the final LDIF entry. At least with some tools (Yahoo address book, for > example), having no final blank line causes the final LDIF entry to be > ignored upon loading. Adding a final blank line to the LDIF file seems > to fix this problem. Again, I haven't looked at the LDIF standard in > detail, so strictly speaking this might just be a Yahoo problem, not a > Net::LDAP::LDIF problem. Yes, it's a Yahoo problem. The separating line is in front of a record according to the RFC, so there shouldn't be a blank line at the end of the file. > 3) If Net::LDAP::LDIF is run on UNIX but opens a Windows-created LDIF > file (\r\n instead of just \n line endings), read_entry doesn't properly > read in the separate entries. That sounds like a bug. Cheers, Chris