1docs::api::Apache2::MPMU(s3e)r Contributed Perl Documentadtoicosn::api::Apache2::MPM(3)
2
3
4
6 Apache2::MPM - Perl API for accessing Apache MPM information
7
9 use Apache2::MPM ();
10
11 # check whether Apache MPM is threaded
12 if (Apache2::MPM->is_threaded) { do_something() }
13
14 # which mpm is used
15 my $mpm = lc Apache2::MPM->show;
16
17 # query mpm properties
18 use Apache2::Const -compile => qw(:mpmq);
19 if (Apache2::MPM->query(Apache2::Const::MPMQ_STATIC)) { ... }
20
22 "Apache2::MPM" provides the Perl API for accessing Apache MPM
23 information.
24
26 "Apache2::MPM" provides the following functions and/or methods:
27
28 "query"
29 Query various attributes of the MPM
30
31 my $query = Apache2::MPM->query($const);
32
33 obj: $class ( "Apache2::MPM class" )
34 the class name
35
36 arg1: $const ( "Apache2::Const :mpmq group constant" )
37 The MPM attribute to query.
38
39 ret: $query ( boolean )
40 the result of the query
41
42 since: 2.0.00
43
44 For example to test whether the mpm is static:
45
46 use Apache2::Const -compile => qw(MPMQ_STATIC);
47 if (Apache2::MPM->query(Apache2::Const::MPMQ_STATIC)) { ... }
48
49 "is_threaded"
50 Check whether the running Apache MPM is threaded.
51
52 my $is_threaded = Apache2::MPM->is_threaded;
53
54 obj: $class ( "Apache2::MPM class" )
55 the class name
56
57 ret: $is_threaded ( boolean )
58 threaded or not
59
60 since: 2.0.00
61
62 Note that this functionality is just a shortcut for:
63
64 use Apache2::Const -compile => qw(MPMQ_IS_THREADED);
65 my $is_threaded = Apache2::MPM->query(Apache2::Const::MPMQ_IS_THREADED);
66
67 "show"
68 What mpm is used
69
70 my $mpm = Apache2::MPM->show();
71
72 obj: $class ( "Apache2::MPM class" )
73 the class name
74
75 ret: $mpm ( string )
76 the name of the MPM. e.g., "Prefork".
77
78 since: 2.0.00
79
81 mod_perl 2.0 documentation.
82
84 mod_perl 2.0 and its core modules are copyrighted under The Apache
85 Software License, Version 2.0.
86
88 The mod_perl development team and numerous contributors.
89
90
91
92perl v5.34.0 2022-02-02 docs::api::Apache2::MPM(3)