Pangloss::Config - config singleton for Pangloss.
use Pangloss::Config; # get config vars from %ENV (if not already set): my $C = Pangloss::Config->new( \%ENV ); print "pangloss home is: $C->{PG_HOME}\n" if $C->{PG_DEBUG}; # force parsing: $C->parse_hash( $some_hash );
Configuration hash for Pangloss, implemented as a singleton.
Config Variable [ default value ] ---------------------------------------------------- PG_DEBUG [ 0 ] PG_HOME [ /path/to/current/dir ] PG_CONFIG_FILE [ $PG_HOME/conf/controller.yml ] PG_TEMPLATE_DIR [ $PG_HOME/web ] PG_TEMPLATE_TYPE [ petal ] PG_SESSION_TYPE [ file_cache ] PG_SESSION_EXPIRY [ 15 minutes ] PG_PIXIE_DSN [ dbi:mysql:dbname=pangloss ] PG_PIXIE_USER [ ] PG_PIXIE_PASS [ ]
create a new Config singleton (unless one exists already) and return it. If the singleton is being created it is initialized with values from $hash, otherwise the defaults are used.
set the config object's params from the hash given, or use the default value.
get the list of config variables available.
get the default value of the $config_var named.
set the default value of the $config_var to the $code_ref given. The $code_ref should expect the current object as its first param.
Steve Purkis <spurkis@quiup.com>
Pangloss
To install Pangloss, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pangloss
CPAN shell
perl -MCPAN -e shell install Pangloss
For more information on module installation, please visit the detailed CPAN module installation guide.