MPMinus
view release on metacpan or search on metacpan
lib/MPMinus.pm view on Meta::CPAN
my $d = $m->drec;
Returns current Dispatcher record. See L<MPMinus::Dispatcher>
=item B<get_apache_version>
my $ver = MPMinus::get_apache_version();
my $ver = $m->get_apache_version();
Returns normalized Apache version
=item B<get, get_node>
my $r = get('r');
Getting node by name
=item B<m, glob>
# Used in the dependent packages
my $m = MPMinus->m;
# Used in the Apache handlers
my $m = shift;
Returns main MPMinus object
=item B<mysql, oracle, multistore>
my $mysql = $m->mysql;
my $oracle = $m->oracle;
my $mso = $m->multistore;
Getting mysql (L<MPMinus::Store::MySQL>), oracle (L<MPMinus::Store::Oracle>) or multistore
(L<MPMinus::Store::MultiStore>) objects
=item B<namespace>
my $namespace = $m->namespace;
Return current name space
=item B<r, req>
my $r = $m->r;
Returns Apache2::RequestRec object. See L<Apache2::RequestRec>
=item B<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);
=item B<set_conf, set_config>
$m->set_conf("LOCALHOST", $m->conf('http_host') =~ /localhost|workstation/ ? 1 : 0);
Setting configuration value
=back
=head1 HISTORY
See C<CHANGES> file
=head1 DEPENDENCIES
C<mod_perl2>, L<CTK>
=head1 TO DO
See C<TODO> file
=head1 BUGS
* none noted
=head1 SEE ALSO
C<mod_perl2>, L<CTK::Util>
=head1 THANKS
Thanks to Dmitry Klimov for technical translating L<http://fla-master.com>
=head1 AUTHOR
Serż Minus (Sergey Lepenkov) L<http://www.serzik.com> E<lt>abalama@cpan.orgE<gt>
=head1 COPYRIGHT
Copyright (C) 1998-2019 D&D Corporation. All Rights Reserved
=head1 LICENSE
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
See C<LICENSE> file and L<https://dev.perl.org/licenses/>
=cut
( run in 0.581 second using v1.01-cache-2.11-cpan-c966e8aa7e8 )