NAME
List::Filter::Internal - internal methods for parameter qualification, etc.
SYNOPSIS
use List::Filter::Internal;
my $lfi = List::Filter::Internal->new( { default_stash => $default_stash } );
my $storage = $lfi->qualify_storage( $args->{ storage } );
# alternate (preferred?), creates:
# $HOME/.list-filter/filters.yaml
my $lfi = List::Filter::Internal->new();
my $storage = $lfi->qualify_storage_from_namespace(
$args->{ storage },
'filter',
);
DESCRIPTION
A collection of miscellanious utility methods expected to be used only internally by List::Filter and it's relatives.
The primary focus is on interface qualification routines that need to be applied at various levels (since client code might be written to access the system at any level), and hence can't be part of any one class.
METHODS
- new
-
Instantiates a new List::Filter 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.
- init
-
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).
- qualify storage
-
Qualifies the "storage" paramameter (used by List::Filter and it's relatives).
Input: the storage argument (scalar or aref)
Return: the qualified storage argument (aref)
Note that this uses the object's "default_stash" argument (scalar) as a fallback.
- qualify_storage_from_namespace
-
Qualifies the "storage" paramameter (used by List::Filter and it's relatives).
Input: (1) the storage argument (scalar or aref) (2) the "namespace" to use to generate a fall back yaml file (scalar).
Return: the qualified storage argument (aref)
- define_yaml_default
-
Internally used routine defines the default filter storage location
Input: basename (aka the namespace) Output: default yaml file to use for storage E.g. $HOME/.list-filter/<namespace>s.yaml
(superceeds older define_storage_default in Handler.pm)
- default_stash
-
Getter for object attribute default_stash
- set_default_stash
-
Setter for object attribute set_default_stash
SEE ALSO
List::Filter List::Filter::Project
AUTHOR
Joseph Brenner, <doom@kzsu.stanford.edu>
COPYRIGHT AND LICENSE
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.
BUGS
None reported... yet.