MPMinus
view release on metacpan or search on metacpan
lib/MPMinus/Manual.pod view on Meta::CPAN
Profit!
=back
=head1 CONFIGURATION
Configuration parameters are initialized in the MPM::MyApp::Handlers package,
that cals via Apache web server config file.
sub handler {
my $r = shift;
my $m = MPMinus->m;
$m->conf_init($r, __PACKAGE__);
...
my $project = $m->conf('project');
...
}
For accessing to configuration variables you can use getter methods conf or
get_conf also setter method - set_conf. See L<MPMinus::Configuration>
=head2 APACHE PER-DIRECTORY VARIABLES
Apache per-directory variables is variables that specified by the PerlSetVar
and PerlAddVar directives in Apache config files, eg:
PerlSetVar ModperlRoot /var/www/foo.localhost
For more information about per-directory variables see
L<http://perl.apache.org/docs/2.0/api/Apache2/RequestUtil.html>
For MPMinus projects allowed following directives:
=over 8
=item B<confdir>
PerlSetVar confdir /var/www/foo.localhost
my $confdir = $m->conf("confdir");
This directive sets directory (path) for searching configuration files of current project
Default: <DOCUMENT_ROOT>/conf
=item B<config, configfiles>
PerlSetVar config /var/www/foo.localhost/foo.conf
my $config_file = $m->conf("fileconf");
my $config_file = $m->conf("configfiles")->[0];
In configuration file specifies configuration file.
In handlers the getter method $m->conf("configfiles") returns array of loaded
configuration files; the method $m->conf("fileconf") returns main loaded file
Default: <DOCUMENT_ROOT>/lc(<PROJCET_NAME>).conf
=item B<debug>
PerlSetVar debug on
$m->log_eror("Oops!") if $m->conf("debug");
Debug flag. The argument can be: on/off; enable/disable; yes/no; true/false and 1/0
The $m->conf("debug") returns boolean value: 1 -- on, 0 -- off
Default: off
=item B<modperlroot>
PerlSetVar modperlroot /var/www/foo.localhost
my $root = $m->conf("modperlroot");
Sets alternate of DOCUMENT_ROOT. Optional directive
Default eq <DOCUMENT_ROOT>
=back
=head2 READ-ONLY MPMINUS PARAMETERS
Parameters that You can read only
=head3 GENERAL PARAMETERS
=over 8
=item B<configloadstatus>
print "Configuration has been loaded!" if $m->conf("configloadstatus");
Return boolean status of loading configuration files
Default: 0
=item B<hitime>
print $m->conf("hitime"); # 1556209483.07221
Returns inited High-precision time value in seconds with 5-dig precision
=item B<locked_keys>
my $array = $m->conf("locked_keys");
Returns reference to list of locked directives (for read only)
Default:
[confdir, configloadstatus, debug, document_root, fileconf, hitime,
http_host, https, locked_keys,logdir, modperl_root, package,
prefix, project, remote_addr, remote_user, request_method,
request_uri, server_admin, server_name, server_port, sid, url]
=item B<logdir>
( run in 3.372 seconds using v1.01-cache-2.11-cpan-5837b0d9d2c )