List::Filter::Filters::Standard - define standard List::Filter filter methods
# This module is not intended to be used directly # See: L<List::Filter::Dispatcher>
This module defines the standard List::Filter filter methods. This is to say that it supplies a series of methods that can be used with a List::Filter "filter" to do the actual filtering operations upon a list of input strings.
Note that this module uses Exporter to export all of it's subs, but these subs must be written as methods (e.g. with "my $self = shift" as first the line), because that's how they'll ultimately be used. Here "$self" is a "Dispatcher" object, and has nothing to do with this package.
Each of these subs begins with:
my $self = shift; my $filter = shift; # object (href based) my $items = shift; # aref my $opt = shift; # href of options (which is itself optional)
And each returns an aref. See "creating new filter methods" in List::Filter::Project.
These are the methods that apply a list of search criteria. Each search filter specifies one of these methods to use by default.
They all have identical interfaces: they take two input arguments, a search filter and a reference to a list of strings to be filtered, and they return an array reference of strings that meet the search criteria.
Pass through an item if it matches any one of the search terms/patterns.
Input:
(1) a search filter structure (which contains an aref of search patterns),
(2) arrayref of items to be searched
Return: arrayref of items that match all criteria.
Pass through an item only if it does not match any of the search terms/patterns.
Input: (1) a search filter structure (which contains an aref of search patterns), (2) arrayref of items to be searched Return: arrayref of items that match all criteria.
Pass through an item if it matches all of the search criteria (irrespective of the the order of the matches inside the string).
On each term of the search criteria, a leading minus sign may reverse the sense of the match.
1;
List::Filter
Joseph Brenner, <doom@kzsu.stanford.edu>
Copyright (C) 2007 by Joseph Brenner
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available.
None reported... yet.
To install List::Filter, copy and paste the appropriate command in to your terminal.
cpanm
cpanm List::Filter
CPAN shell
perl -MCPAN -e shell install List::Filter
For more information on module installation, please visit the detailed CPAN module installation guide.