The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

MPMinus - mod_perl2 Web Application Framework

VERSION

Version 1.17

REVISION

$Revision: 195 $

SYNOPSIS

    use MPMinus;

ABSTRACT

MPMinus - mod_perl2 Web Application Framework

DESCRIPTION

See README file first and MPMinus::Manual

METHODS

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, 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

CTK, Apache2, TemplateM

TO DO

See TODO file

BUGS

* none noted

SEE ALSO

perl, CTK, CTK::Util, TemplateM

THANKS

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

AUTHOR

Serz Minus (Lepenkov Sergey) http://serzik.ru <minus@mail333.com>

COPYRIGHT

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

LICENSE

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