Bio::Polloc::Polloc::Config - Handles .cfg files
Email lmrodriguezr at gmail dot com
See the scripts folder (.bme files) for examples of the expected syntaxis.
Global variables controling the behavior of the package
Maximum depth of variables replacement
Current depth of replacement (internal var)
Methods provided by the package
Initialization method.
Arguments
A reference to an array of strings, each containing a namespace to be parsed.
If set to true, does not automatically parse the file on creation. If so, the parse function must be manually called.
Parses the configuration file.
Throws
Bio::Polloc::Polloc::IOException on parsing error.
Gets/sets the spaces to be parsed.
Gets the value of a given key.
The key (can contain namespace).
The namespace.
If true, dies if not found.
If true, does not alert if not found.
Bio::Polloc::Polloc::Error If not found and mandatory.
Gets all the stored keys.
The parent space. By default ..
.
Returns
All the keys within the space (array of str).
A key by alias.
The from key name.
The to key name.
Bio::Polloc::Polloc::Error if any of the two keys is empty.
Methods intended to be used only within the scope of Bio::Polloc::*
Removes comments from lines and lines with spaces only.
Saves a key/value pair.
The namespace
The name of the key (can contain the namespace before a dot (.) if not explicitly provided).
The value.
The (uniform) key of the saved pair. If array or list, the key and the value.
Parses (cleans) the name of a namespace.
The namespace to parse.
The parsed (uniform) namespace.
Indicates whether a namespace is required. I.e., if the user explicitly requiested the space, any child or any parent.
Boolean (int).
Executes a token expected to map to a function.
The token (can contains namespace if not explicitly passed).
The namespace of the token.
A reference to an array containing the arguments to be passed to the function.
Executes registered functions to be launched once parsing is finnished.
Register a handle function (for tokens).
Token (can contain namespace).
Reference to the object *containing* the function.
Name of the function (note that this is the name of the function within the object, not a reference to the function itself).
Default parameters to be passed to the function after the body.
Namespace of the token.
Registers a function to be launched once parsing is complete.
The object containing the function.
The name of the function within the object.
The parameters to be passed to the function.
Gets the collection of functions to handle tokens.
Gets the collection of functions to be launched after parsing.
Gets the handle function for the given token.
The token.
Parses recursively all values until no references to other vars last or the maximum depth is reached, whatever happens first.
Parses a key and returns its uniform name.
The key name (can contain namespace if not explicitly set).
Creates an alias for a key based on a string input. See alias.
A string containing the name of the from key, one or more spaces and the name of the to string. Can contain surrounding spaces.
Bio::Polloc::Polloc::Error if empty string or not properly formatted.
21 POD Errors
The following errors were encountered while parsing the POD:
Expected '=item *'
To install Bio::Polloc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Bio::Polloc
CPAN shell
perl -MCPAN -e shell install Bio::Polloc
For more information on module installation, please visit the detailed CPAN module installation guide.