[Omaha.pm] Net::LDAP

Bill Brush bbrush at gmail.com
Tue Feb 21 16:18:18 PST 2012


Hey no problem Jay, I've been around IRC long enough to know how
things work.  I've done my share of walk-aways, believe me.

I'm going to be spamming the list over the next few days with
questions while I get up to speed with this.

Thanks!
Bill

On Tue, Feb 21, 2012 at 3:50 PM, Jay Hannah <jay at jays.net> wrote:
> Hi Bill,
>
> Sorry, I was in a meeting so wasn't staring at IRC.   :)
>
>   my $ad = Net::LDAP->new("ad.wjgilmore.com");
>
> Yes, that creates a new object, $ad, of the class Net::LDAP.
>
> The author of that class, apparently, allows a single argument to be passed in -- the server you want to connect to. Class authors can do whatever they want to arguments passed into new().
>
>   $ad->bind("ad-web\@ad.wjgilmore.com", password=>"secret");
>
> In OO programming bind() is called an object method. (method, function... in perl it's all just a sub {} under the hood :)
>
> Many people doing OO in perl5 use Moose nowadays. Check it out!:   https://metacpan.org/module/Moose
>
> I saw you just joined this mailing list! Welcome!
>
> j
> /me runs off to pick up his dogs at the vet   :)
>
>
>
>
>
>
>
> 20:24 < jhannah> hi Bill  :)
> 20:24 < BillBrush> I'm on the OLUG list
> 20:25 < jhannah> I'm sorry.  ;)
> 20:25 < BillBrush> :-)  No worries, I mainly lurk (for about 10) years
> 20:25 < jhannah> ya, me too
> 20:26 < jhannah> you might want to /join #OmahaLUG
> 20:26 < BillBrush> I'm toying with the idea of using my novice perl skills to write an LDAP
>                   query script.  Can I ask some realy basic questions?
> 20:26 < jhannah> absolutely.  :)   you might want to join the omaha.pm.org mailing list
> 20:27 < BillBrush> Just to give some idea, I've been programming at various basic levels since
>                   84, but I'm not a "dev" and object oriented came long after I was out of
>                   school.
> 20:28 < BillBrush> So I'm looking at this statement:
> 20:28 < BillBrush> my $ad = Net::LDAP->new("ad.wjgilmore.com")
> 20:28 < BillBrush>          or die "Could not connect!";
> 20:28 < BillBrush> That creates an object ($ad) and sets the object property to (ad.blah.com)
> 20:28 < BillBrush> Am I reading that right?
> 20:29 < BillBrush> Assuming than I am, this statement then uses the bind function of the object
>                   to open the connection to the LDAP.
> 20:29 < BillBrush> $ad->bind("ad-web\@ad.wjgilmore.com", password=>"secret");
> 20:30 < BillBrush> Am I on track or out in left field?
> 20:41  * BillBrush thinks he scared Jay off
> 21:23 -!- BillBrush [~bbrush at netv-net3674.unl.edu] has quit [Remote host closed the connection]
> 21:43 < jhannah> haha, was in a meeting
>
>
> _______________________________________________
> Omaha-pm mailing list
> Omaha-pm at pm.org
> http://mail.pm.org/mailman/listinfo/omaha-pm


More information about the Omaha-pm mailing list