List::Filter::Internal - internal methods for parameter qualification, etc.


List-Filter documentation  | view source Contained in the List-Filter distribution.

Index


NAME

Top

List::Filter::Internal - internal methods for parameter qualification, etc.

SYNOPSIS

Top

  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

Top

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

Top

List::Filter List::Filter::Project

AUTHOR

Top

Joseph Brenner, <doom@kzsu.stanford.edu>

COPYRIGHT AND LICENSE

Top

BUGS

Top

None reported... yet.


List-Filter documentation  | view source Contained in the List-Filter distribution.