docs::a...he2::MPM(3)

πŸ“¦ version 2.0.13, in nixos 26.05, nixpkgs unstable

🌸 NAME 🌸

okay so bestie, this page is docs::a...he2::MPM(3), and it comes from the User Contributed Perl Documentation ✨. The main character here is Apache2::MPM β€” the Perl API for accessing Apache MPM information πŸ’….

πŸŽ€ Synopsis πŸŽ€

use Apache2::MPM ();

# check whether Apache MPM is threaded
if (Apache2::MPM->is_threaded) { do_something() }

# which mpm is used
my $mpm = lc Apache2::MPM->show;

# query mpm properties
use Apache2::Const -compile => qw(:mpmq);
if (Apache2::MPM->query(Apache2::Const::MPMQ_STATIC)) { ... }

πŸ¦‹ Description πŸ¦‹

so like, Apache2::MPM provides the Perl API for accessing Apache MPM information. That's the whole vibe β€” MPM info, but make it Perl 🫢.

πŸ’… API πŸ’…

Apache2::MPM provides the following functions and/or methods, bestie:

πŸŽ€ "query" πŸŽ€

Query various attributes of the MPM ✨

my $query = Apache2::MPM->query($const);
  • obj: $class ("Apache2::MPM class") β€” the class name.
  • arg1: $const ("Apache2::Const :mpmq group constant") β€” The MPM attribute to query.
  • ret: $query (boolean) β€” the result of the query.
  • since: 2.0.00

For example to test whether the mpm is static:

use Apache2::Const -compile => qw(MPMQ_STATIC);
if (Apache2::MPM->query(Apache2::Const::MPMQ_STATIC)) { ... }

πŸ¦‹ "is_threaded" πŸ¦‹

Check whether the running Apache MPM is threaded πŸ‘€

my $is_threaded = Apache2::MPM->is_threaded;
  • obj: $class ("Apache2::MPM class") β€” the class name.
  • ret: $is_threaded (boolean) β€” threaded or not.
  • since: 2.0.00

Note that this functionality is just a shortcut for:

use Apache2::Const -compile => qw(MPMQ_IS_THREADED);
my $is_threaded = Apache2::MPM->query(Apache2::Const::MPMQ_IS_THREADED);

🌈 "show" 🌈

What mpm is used πŸ”₯

my $mpm = Apache2::MPM->show();
  • obj: $class ("Apache2::MPM class") β€” the class name.
  • ret: $mpm (string) β€” the name of the MPM. e.g., "Prefork".
  • since: 2.0.00

πŸ‘‘ See Also πŸ‘‘

mod_perl 2.0 documentation. β€” go peek at that, bestie πŸ’–

mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.

πŸ’œ Authors πŸ’œ

The mod_perl development team and numerous contributors.


mwah πŸ’‹ this cutie is from perl v5.42.3, dated 2023-10-21, and the page is docs::a...he2::MPM(3) ✨🫢

πŸ“¦ where this page comes from