NAME

MPMinus - mod_perl2 Web Application Framework

VERSION

Version 1.21

SYNOPSIS

use MPMinus;

ABSTRACT

MPMinus - mod_perl2 Web Application Framework

DESCRIPTION

See MPMinus::Manual first

METHODS

new
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.

conf, config, get_conf, get_config
my $project = $m->conf('project');

Getting configuration value by name

disp, dispatcher
my $disp = $m->disp;

Returns all Dispatcher records

drec, drecord, record
my $d = $m->drec;

Returns current Dispatcher record. See MPMinus::Dispatcher

get_apache_version
my $ver = MPMinus::get_apache_version();
my $ver = $m->get_apache_version();

Returns normalized Apache version

get, get_node
my $r = get('r');

Getting node by name

m, glob
# Used in the dependent packages
my $m = MPMinus->m;

# Used in the Apache handlers
my $m = shift;

Returns main MPMinus object

mysql, oracle, multistore
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

namespace
my $namespace = $m->namespace;

Return current name space

r, req
my $r = $m->r;

Returns Apache2::RequestRec object. See Apache2::RequestRec

set, set_node

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);
set_conf, set_config
$m->set_conf("LOCALHOST", $m->conf('http_host') =~ /localhost|workstation/ ? 1 : 0);

Setting configuration value

HISTORY

See CHANGES file

DEPENDENCIES

mod_perl2, CTK

TO DO

See TODO file

BUGS

* none noted

SEE ALSO

mod_perl2, CTK::Util

THANKS

Thanks to Dmitry Klimov for technical translating http://fla-master.com

AUTHOR

Serż Minus (Sergey Lepenkov) http://www.serzik.com <abalama@cpan.org>

COPYRIGHT

Copyright (C) 1998-2019 D&D Corporation. All Rights Reserved

LICENSE

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/