> > Is there already a function that will parse this filter?
> > ldap:///ou=People,o=acme,c=us?uid?one?(&(mail=*)(c=CA))
> URI::ldap should be able to split the whole thing up into bits, and surely
> Net::LDAP::Filter can parse the filter bit from that?
OK, I suppose there are pitfalls like escaped question marks.
I'll take a look at those modules, but it seems like this would work...
# get the result of a filter
sub get_filter result() {
my ($base,$attr,$scope,$filter) = split(/?/,shift());
$base = (split(/\//))[-1];
my @Attrs = split(/,/$attr);
my $result = $ldap->search( base => $base,
filter => $filter,
scope => $scope,
attrs => [EMAIL PROTECTED] );
. . .
}