List::FilterList::Filter - named, persistent, shared lists of patterns. | |
Download |
List::Filter Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Joseph Brenner
- Publisher web site:
- http://search.cpan.org/~doom/
List::Filter Tags
List::Filter Description
List::Filter - named, persistent, shared lists of patterns. List::Filter - named, shared, persistent lists of patterns.SYNOPSIS use List::Filter; my $filter = List::Filter->new( { name => 'skip_boring_stuff', terms => , method => 'skip_boring_stuff', description => "Skip the really boring stuff", modifiers => "xi", } ); # If non-standard behavior is desired in locating the methods via plugins my $filter = List::Filter->new( { name => 'skip_boring_stuff', terms => , method => 'skip_boring_stuff', description => "Skip the really boring stuff", modifiers => "xi", plugin_root => 'List::Filter::Filters', plugin_exceptions => , } ); # Alternately: my $filter = List::Filter->new(); # creates an *empty* filter my @terms = ; $filter->set_name('skip_dull'); $filter->set_terms( @terms ); $filter->set_method('skip_boring_stuff'); $filter->set_description( "Skip the really boring stuff"); $filter->set_modifiers( "xi" ); # using a filter (using it's internally defined "method") my $output_items = $filter->apply( @input_items ); # using a filter, specifying an alternate "method" my $output_items = $filter->apply( @input_items, "do_it_like_this" );The List::Filter system is a generalized, extensible way of filtering a list of items by apply a stack of perl regular expressions, with a persistant storage mechanism to allow the sharing of filters between different applications.A List::Filter filter would just be a container object (a hashref with some accessor code), except that it also has an internally generated "dispatcher" object, so that it knows how to "apply" itself.The "method" attribute of a filter object is indeed the name of a method, but not one defined inside this module. Instead there's a "plug-in" system that allows the definition of new methods without modification of the existing code. Requirements: · Perl
List::Filter Related Software