Smolder::Conf - Smolder configuration module
# all configuration directives are available as exported subs use Smolder::Conf qw(Secret Port); $secret = Secret; # you can also call get() in Smolder::Conf directly $port = Smolder::Conf->get("Port"); # or you can access them as methods in the Smolder::Conf module $port = Smolder::Conf->Port;
This module provides access to the configuration settings in smolder.conf.
Full details on all configuration parameters is available in the configuration document, which you can find at docs/configuration.
Class method that returns the underlying Config::ApacheFormat object.
Given a directive name, returns the value (which may be a list) of a configuration directive. Directive names are case-insensitive.
$value = Smolder::Conf->get("DirectiveName") @values = Smolder::Conf->get("DirectiveName")
Sanity-check Smolder configuration. This will croak() with an error message if something is wrong with the configuration file.
This is run when the Smolder::Conf loads unless the environment variable "SMOLDER_CONF_NOCHECK" is set to a true value.
The directory path for the templates for this install of Smolder
The directory path for the htdocs for this install of Smolder
The directory path for the raw SQL files for this install of Smolder
The directory path for data directory for this install of Smolder
The directory path for test data directory for this copy of Smolder
All configuration directives can be accessed as methods themselves.
my $port = Smolder::Conf->port();
Gets the value of a directive using an autoloaded method. Directive names are case-insensitive.
Each configuration directive can also be accessed as an exported subroutine.
use Smolder::Conf qw(port FromAddress); ... my $port = port(); my $from = FromAddress();
Directive names are case-insensitive. Gets the value of a variable using an exported, autoloaded method. Case-insensitive.
To install Smolder, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Smolder
CPAN shell
perl -MCPAN -e shell install Smolder
For more information on module installation, please visit the detailed CPAN module installation guide.