On 14/1/06 8:00, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> package Net::LDAP::Schema;
>
> # given the attribute and a matchtype (e.g. equality) this will return the
> name of the rule to apply
>
> sub matchingruleforattribute($@)
> {
> my $schema = shift;
> my $attr = shift;
> my $matchtype = shift;
>
> my $attrtype = $schema->attribute( $attr );
> if (exists $attrtype->{$matchtype}){
> return $attrtype->{$matchtype} ;
> }
> elsif (exists $attrtype->{'sup'}){
> # the assumption is that all superiors result in the same ruleset
> return matchingruleforattribute( $schema, $attrtype->{'sup'}[0],
> $matchtype);
> }
> return undef;
> }
(Sorry for the previous truncated mail.) I committed a renamed version of
this bit just now - matchingrule_for_attribute.
Cheers,
Chris