[prev in list] [next in list] [prev in thread] [next in thread]
List: perl-ldap-dev
Subject: Re: LDAP.pm
From: Chris Ridd <chrisridd () mac ! com>
Date: 2004-09-08 6:44:42
Message-ID: BD6468EA.418F3%chrisridd () mac ! com
[Download RAW message or body]
On 8/9/04 2:06 am, Eddie C. Pagaduan Jr. <eddie@caymas.com> wrote:
> Hi Mr. Graham Barr,
>
> I am currently using your LDAP.pm perl module.
> I would like to perform LDAP searches on scope='sub' and
> deref=>'always'.
> But it looks like these cannot be modified.
>
> I ran an Ethereal trace and noticed that the scope is always set to
> 'base' and deref is always set to 'find'.
> I looked in LDAP.pm and noticed that these paramaters are hard-coded.
Default values are hardcoded, which are then overridden from parameters
passed to the search method.
--- LDAP.pm 0.32 ---
my %stash = (
baseObject => ref($base) ? $base->dn : $base,
scope => 2,
derefAliases => 2,
sizeLimit => $arg->{sizelimit} || 0,
timeLimit => $arg->{timelimit} || 0,
typesOnly => $arg->{typesonly} || $arg->{attrsonly} || 0,
filter => $filter,
attributes => $arg->{attrs} || []
);
if (exists $arg->{scope}) {
my $sc = lc $arg->{scope};
$stash{scope} = 0 + (exists $scope{$sc} ? $scope{$sc} : $sc);
}
if (exists $arg->{deref}) {
my $dr = lc $arg->{deref};
$stash{derefAliases} = 0 + (exists $deref{$dr} ? $deref{$dr} : $dr);
}
---
> Is there a reason why it was coded so that these parameters cannot be
> modified?
> For Example, will it break if I changed LDAP.pm to allow LDAP searches
> with:
> scope=>'sub'
> deref=>'always'
I think you'd be changing something that isn't a bug :-)
>
> Thanks,
> Eddie Pagaduan
>
>
Cheers,
Chris
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic