MPMinus - mod_perl2 Web Application Framework
Version 1.18
$Revision: 205 $
use MPMinus;
See README file first and MPMinus::Manual
README
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 $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
CTK, Apache2, TemplateM
See TODO file
TODO
* none noted
perl, CTK, CTK::Util, TemplateM
perl
Thanks to Dmitry Klimov for technical translating http://fla-master.com.
http://fla-master.com
Serz Minus (Lepenkov Sergey) http://serzik.ru <minus@mail333.com>
Copyright (C) 1998-2013 D&D Corporation. All Rights Reserved
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See LICENSE file
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.