List::Filter::Storage::CODE - reads in standard libraries of filters from code
# This is a plugin, not intended for direct use. # See: List:Filter:Storage use List::Filter::Storage::CODE; # load all of transforms from standard library module location my $storage = List::Filter::Storage::CODE->new({ type => 'transform', }); # load just the specified filter libraries # (Note: allows non-standard locations, and/or conserves memory) my $storage = List::Filter::Storage::CODE->new({ connect_to => [ Some::Odd::Library::Module And::Another ], type => 'filter', }); # Retrieving a filter my $filter = $storage->lookup( ':omit' );
The List::Filter project ships with some standard filters defined in perl code. The "CODE" storage location format allows these filters to be looked up by name using the standard storage interface.
This format may be used in two ways:
(1) by default it will slurp in all definitions found in all of the modules found in the standard library location for the data type (e.g. for "filter" it will look in "List::Filter::Library::*" , for "transform" it will look in "List::Filter::Transform::Library::*").
(2) It can be provided with a list of libary names, (which should correspond to file names: <*>.pm), and it will only load the filters from those particular files.
Instantiates a new List::Filter::Storage::CODE object.
With no arguments, the newly created profile will be loaded with all filters from the appropriate installed code libraries.
If connect_to is defined as a list of library module names, it will load only those library modules.
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).
See "lookup" in "lookup" in List::Filter::Storage::MEM
From the type of the stored filters (e.g. 'filter', 'transform'), determine the appropriate filter library location in the perl module namespace.
This implements the convention:
List::Filter::<upper-case type>::Library, except that for type 'filter' the class is just "List::Filter::Library::".
Gets "type" from the object data, unless supplied as an argument.
Loads all available libraries of filters.
The type ('filter', 'transform', etc.) will come from the object data, unless passed in as a second argument.
Loads all requested libraries of filters, from the tree of libraries for the type ('filter', 'transform'). This type must be passed in in the attributes hash reference. The given list of names should be an aref of module names.
This routine does hash addition, merging the key-value pairs of one hash into another.
It takes two hash references, and adds the values of the second into the first.
Inputs: (1) the summation href, (2) the href to be added into the first.
Return: a copy of the summation href, for convenience: don't assume that the first argument isn't modified.
See List::Filter::StorageBase for the basic accessors.
List::Filter::Project List:Filter:Storage List::Filter
Joseph Brenner, <doom@kzsu.stanford.edu>, 24 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.
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.