Pangloss::Search::Filter::Base - base class for collection filters
# abstract - must be subclassed for use: use Pangloss::Search::Filter::FooBar; my $filter = new Pangloss::Search::Filter::FooBar()->set( $baz );
An abstract search filter object for use with <Pangloss::Collection::Item>s.
get/set this filter's hash of collection-item keys (see sub-classes for usage).
get the keys as a list.
toggle given key, returns current state true => on, false => off.
set given keys to on.
set given keys to off.
test to see if the given key is set.
clear all set keys.
get number of keys currently set.
test to see if no keys are currently set.
test to see if any keys are currently set.
deprecated aliases to set, unset & is_set.
At the very least, you must do the following:
package Foo; use base qw( Pangloss::Search::Filter::Base ); sub applies_to { my $self = shift; my $term = shift; # use $term, $self->item_keys and the collections # available via $self->parent to do your test return 0 || 1; }
Steve Purkis <spurkis@quiup.com>
Pangloss::Search
Pangloss::Search::Filter::Category, Pangloss::Search::Filter::Concept, Pangloss::Search::Filter::Language, Pangloss::Search::Filter::Proofreader, Pangloss::Search::Filter::Translator, Pangloss::Search::Filter::Status, Pangloss::Search::Filter::DateRange
To install Pangloss, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pangloss
CPAN shell
perl -MCPAN -e shell install Pangloss
For more information on module installation, please visit the detailed CPAN module installation guide.