MPMinus - mod_perl2 Web Application Framework
Version 1.21
use MPMinus;
See MPMinus::Manual first
my $m = new MPMinus(); my $m = new MPMinus( "My::App" ); my $m = new MPMinus( __PACKAGE__ );
Returns MPMinus object.
First argument is optional. Specifies caller package name.
my $project = $m->conf('project');
Getting configuration value by name
my $disp = $m->disp;
Returns all Dispatcher records
my $d = $m->drec;
Returns current Dispatcher record. See MPMinus::Dispatcher
my $ver = MPMinus::get_apache_version(); my $ver = $m->get_apache_version();
Returns normalized Apache version
my $r = get('r');
Getting node by name
# Used in the dependent packages my $m = MPMinus->m; # Used in the Apache handlers my $m = shift;
Returns main MPMinus object
my $mysql = $m->mysql; my $oracle = $m->oracle; my $mso = $m->multistore;
Getting mysql (MPMinus::Store::MySQL), oracle (MPMinus::Store::Oracle) or multistore (MPMinus::Store::MultiStore) objects
my $namespace = $m->namespace;
Return current name space
my $r = $m->r;
Returns Apache2::RequestRec object. See Apache2::RequestRec
Setting node by name
For example (in handler of MPM::foo::Handlers module):
# Set r as Apache2::RequestRec object $m->set( r => $r ); # Set mysql as MPMinus::Store::MySQL object $m->set( mysql => new MPMinus::Store::MySQL( -m => $m, -attributes => {mysql_enable_utf8 => 1 }) ) unless $m->mysql; # Set disp as MPMinus::Dispatcher object $m->set( disp => new MPMinus::Dispatcher($m->conf('project'),$m->namespace) ) unless $m->disp; # Initialising dispatcher record my $record = $m->disp->get(-uri=>$m->conf('request_uri')); $m->set(drec => $record);
$m->set_conf("LOCALHOST", $m->conf('http_host') =~ /localhost|workstation/ ? 1 : 0);
Setting configuration value
See CHANGES file
CHANGES
mod_perl2, CTK
mod_perl2
See TODO file
TODO
* none noted
mod_perl2, CTK::Util
Thanks to Dmitry Klimov for technical translating http://fla-master.com
Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>
Copyright (C) 1998-2019 D&D Corporation. All Rights Reserved
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See LICENSE file and https://dev.perl.org/licenses/
LICENSE
To install MPMinus, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MPMinus
CPAN shell
perl -MCPAN -e shell install MPMinus
For more information on module installation, please visit the detailed CPAN module installation guide.