Wrapper object for multiple filters. Use this to test a object against multiple filters conveniently.
For available language attributes to filter with, see. https://pootle.readthedocs.io/en/stable-2.5.1/api/api_language.html#get-a-language or Pootle::Resource::Language
To pick only the Galician language from all the languages the Pootle server supports
my $languages = $papi->findLanguages( Pootle::Filters->new({ fullname => qr/^Galician/, code => qr/gl_?.*/, }));
To find all English dialects
my $languages = $papi->findLanguages( Pootle::Filters->new({ code => qr/^en/, #All codes starting with 'en', such as en_GB, en_NZ, ... }));
Filters can filter all Pootle::Resource::* -objects
my $ok = Pootle::Client::Filter->new({ fullname => qr/^Finnish/, code => qr/^fi/, })->matches($objects); @PARAM1 ARRAYRef of {key => regexp}, {...} -pairs. Key selects the object's attribute to test against, and regexp matches against the attribute value @RETURNS Pootle::Client::Filters
Apply filters to the given object and return if object matches them
@PARAM1 Pootle::Resource::*-object @PARAM2 HASHRef of @RETURNS Boolean, True when all filters match
Given two groups of Pootle::Resource::* -objects, finds an intersection of a given attribute.
@RETURNS ARRAYRef of Pootle::Filters::Intersection-objects
To install Pootle::Client, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pootle::Client
CPAN shell
perl -MCPAN -e shell install Pootle::Client
For more information on module installation, please visit the detailed CPAN module installation guide.