Net::DSML::filter.pm

Net::DSML::filter.pm is a Perl module that supplies a Net::DSML::Filter object that is used by a Net::DSML object.
Download

Net::DSML::filter.pm Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Clif Harden
  • Publisher web site:
  • http://search.cpan.org/~charden/Net-DSML-0.003/lib/Net/DSML/Filter.pm

Net::DSML::filter.pm Tags


Net::DSML::filter.pm Description

Net::DSML::filter.pm is a Perl module that supplies a Net::DSML::Filter object that is used by a Net::DSML object. Net::DSML::filter.pm is a Perl module that supplies a Net::DSML::Filter object that is used by a Net::DSML object.SYNOPSISfilter.pm - A perl module that supplies several different LDAP DSML filter types.This module is used in conjunction with the Net::DSML module which does LDAP DSML queries to a LDAP directory server.The DSML xml format is very strict and unforgiving of errors. Because of this I have made the calling of these filter methods strict also. The methods expect variables to be in a certain order.Also methods are expected to be called in a certain order also.The following is an example of building a simple subString filter. # Create the filter object. my $webfilter = Net::DSML::filter->new(debug => 1); # put the subString xml elements on the filter string $webfilter->subString( { type => "initial", attribute => "uid", value => "Bugs" } ); # Get the resulting filter $filter = $webfilter->getFilter(); The following is an example of building a compound equalityMatch filter. # Create the filter object. my $webfilter = filter->new(debug => 1); # Put the < filter > element on the filter string $webfilter->start(); # Use the "and" to make compound filter $webfilter->and(); # put the equalityMatch xml elements on the filter string $webfilter->equalityMatch({ attribute => "sn", value => "Bunny" } ); # put the equalityMatch xml elements on the filter string $webfilter->equalityMatch( { attribute => "givenname", value => "jay" } ); # Put the ending and element on the filter string $webfilter->endand(); # Put the < /filter > element on the filter string $webfilter->terminate(); # Get the resulting filter $filter = $webfilter->getFilter(); The following is an example of building a complex compound equalityMatch filter. # Create the filter object. my $webfilter = Net::DSML::filter->new(debug => 1); # Put the < filter > element on the filter string $webfilter->start(); # Use the "and" to make compound filter $webfilter->and(); # put the equalityMatch xml elements on the filter string $webfilter->equalityMatch( { attribute => "sn", value => "Bunny" } ); # Use the "not" to make more complex compound filter $webfilter->not(); # put the equalityMatch xml elements on the filter string $webfilter->equalityMatch( { attribute => "givenname", value => "jay" } ); # Put the ending not element on the filter string $webfilter->endnot(); # Put the ending and element on the filter string $webfilter->endand(); # Put the < /filter > element on the filter string $webfilter->terminate(); # Get the resulting filter $filter = $webfilter->getFilter(); By combining the and, or , and not methods you can make some very complex filters. Requirements: · Perl


Net::DSML::filter.pm Related Software