Erik Hollensbe > App-Open-0.0.4 > App::Open::Config

Download:
App-Open-0.0.4.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

METHODS

new($config_file)

Constructor, optionally takes the name of a config file; calls load_config() automatically.

load_config()

Loads the configuration (or resets it). If there is trouble reading the configuration, it will supply a default empty configuration.

This call will die if the configuration is available, not undefined and does not evaluate to a hash.

load_backends(@backends)

A frontend to load_backend(). Takes a list of backends to be processed in priority.

load_backend($backend)

Gets the parameters for the backend, name and arguments. Requires the module for the backend via require_backend() and on success, constructs an object from that module with the supplied arguments and stores it in the backend list.

The $backend argument can either be a hashref or string, this is detailed in some comments in load_backends().

If the backend supplied cannot be loaded, it will die with NO_BACKEND_FOUND.

require_backend($backend)

Attempts to use the module that corresponds to the backend name. This will try a couple of namespaces to load a backend:

App::Open::Backend::
"" (root namespace)

On success, it will return the module name used. Otherwise, undef.

config()

Convenience call to access the config hash.

config_file()

Convenience call to access the config filename.

backend_order()

Returns the lookup order of the various MIME backends as arrayref.

In the instance that this does not already exist when it is called, a new, empty arrayref will be created and returned.

syntax highlighting: