I haven't done much in perl for quite a few years now. This weekend, I needed to write some program that talks to LDAP.

I initially decided to do it in Ruby. I searched around and found Ruby's net/ldap library. I downloaded it and started to play with it. Everything looked fine for the first 5 minutes and it was easy to use, but when I tried to use the API to search for entries on LDAP, I simply couldn't got it to work - the return code always indicated that the search was successful, but the result set is empty all the time. I was pretty sure that I were using the library as supposed, but...

After a hour or so, I thought that that was a waste of time. My purpose was to have a piece of program that talks to LDAP and do things, and I don't care whether it's written in Ruby.

I searched for libraries in various languages, and when I landed on Graham Barr's Perl Net::LDAP on CPAN, I decided to give it a try.

Within 5 minutes, I got it talk to LDAP, and when it comes to search for entries, it worked great. After couple of hours, I completed the entire program and got everything I wanted.

Perl is old for sure, and I don't neccessary like everything about Perl, but it gets the job done for me, in this case and in many other cases.

Graham Barr did a great job to create the Perl LDAP library. It is easy to use, easy to understand and it is OO.

CPAN is a great treasure.

Peter (Guo) Pei


In reply to It all comes down to one thing - whether it gets the job done by PeterPeiGuo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.