List::Filter::Storage::YAML - plugin for filter storage via YAML files
# This is a plugin, not intended for direct use. # See: List:Filter:Storage use List::Filter::Storage::YAML; my $storage = List::Filter::Storage::YAML->new( { connect_to => $yaml_file, } ); my $filter = List::Filter->new( { name => 'some_search_filter', # [... see List::Filter ...] } ); $storage->save( $filter ) my $named_filter = $storage->lookup( $name );
List::Filter::Storage::YAML is the plugin that handles storage of List::Filter "filters" (e.g. "filters", "transforms") to YAML files.
Instantiates a new List::Filter::Profile object.
Takes an optional hashref as an argument, with named fields identical to the names of the object attributes.
With no arguments, the newly created filter will be empty.
Initialize object attributes and then lock them down to prevent accidental creation of new ones.
Note: there is no leading underscore on name "init", though it's arguably an "internal" routine (i.e. not likely to be of use to client code).
Given a filter name, returns a matching filter object, or undef.
Given a filter, adds it to the internal mass of "filter_data", and saves the entire set to a yaml file.
Excludes any filters that are named with a leading underscore.
Returns a reference to the given filter object.
This method actually reads the yaml file, and stores the hash of hashes structure inside of the object in "filter_data".
Returns a list of all avaliable named filters.
Getter for object attribute filter_data
Note: the yaml file is not slurped in until an attempt is made to access this data.
Setter for object attribute set_filter_data
Getter for object attribute connect_to
Setter for object attribute set_connect_to
Getter for object attribute owner
Setter for object attribute set_owner
Getter for object attribute password
Setter for object attribute set_password
Getter for object attribute attributes
Setter for object attribute set_attributes
Getter for object attribute extra
Setter for object attribute set_extra
Outside of this module, a "filter" is an object, inside of this module, it's a hashref with four fields: "method", "description", "terms", "modifiers". Note, that the "name" is excluded from this list, because each of these hashrefs is stored inside a larger hashref, keyed by "name" for rapid lookups.
The external YAML file contains a copy of this data structure, and it is read and written in it's entirety, and held cached in memory inside this object.
List::Filter::Project List:Filter:Storage List::Filter
Joseph Brenner, <doom@kzsu.stanford.edu>, 18 May 2007
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.
2 POD Errors
The following errors were encountered while parsing the POD:
'=item' outside of any '=over'
You forgot a '=back' before '=head2'
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.