Re: Net::LDAP::Entry - RFC
Peter Marschall <[email protected]> Tue, 02 Jan 2018 19:48:16 +0100
| Newsgroups | gmane.comp.lang.perl.modules.ldap |
|---|---|
| Message-ID | <[email protected]> |
Am 2=2E Januar 2018 18:58:50 MEZ schrieb Chris Ridd <chrisridd@mac=2Ecom>: > >> On 2 Jan 2018, at 13:36, Burns, Victor M via perl-ldap ><perl-ldap@perl=2Eorg> wrote: >>=20 >> Thanks for getting back to me=2E I suspect I confused the version >number=2E As you know perl-ldap is a large set of classes=2E I am using t= he >latest perl-ldap-0=2E65 and the class in Question Net::LDAP::Entry is >0=2E27 and is confirmed both on my system and on CPAN at this link; >http://search=2Ecpan=2Eorg/~marschap/perl-ldap-0=2E65/lib/Net/LDAP/Entry= =2Epod >which shows it is version 0=2E27 and is part of perl-ldap-0=2E65 > >OK=2E > >> As I mentioned it might be nice if the ldif method supported >additional options=2E I found it useful to have a wrap =3D> 0 option to >disable wrapping=2E For now I get around the issue by cheating=2E In a >class I've written I fudge a new method, ldif_nowrap, into the >Net::LDAP::Entry namespace, "God bless PERL!" that hardcodes the ( wrap >=3D> 0 ) into it and I call it in the place of the regular ldif method=2E= I >do it this way and avoid the Perl redefined subroutine warning all >together=2E I'm a huge fan of strict and warnings! I don't write anything >without them=2E :) > >Disabling LDIF wrapping is pretty useful when you=E2=80=99ve got long val= ues >getting output, and you=E2=80=99re eyeballing the output, or even passing= it to >tools that aren=E2=80=99t LDIF-aware (e=2Eg=2E grep!) > >We (ForgeRock) even changed the default in ForgeRock's ldapsearch tool >to not wrap as of DS 5=2Ex=2E > >IMO changing Net::LDAP::LDIF to be able to not wrap would be useful=2E > >Chris Hi, Please have a look at * Net::LDAP::Entry->update I consider it the better interface as it does not create an Net::LDAP::= LDIF imstande vor every call=2E This method supports everything you need with an appropriately opened L= DIF object * The changes in https://github=2Ecom/marschap/perl-ldap/tree/next I expect this to become the next perl-ldap release=2E Please test the changes in Net::LDAP::Entry=2E Improvement ideas welcome=2E Especially if they hinder the user from making stupid mistakes like cal= ling LDIF(version=3D>1) Peter --=20 Peter Marschall <peter@adpm=2Ede>