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 informa‐
23 tion.
24
26 "Apache2::MPM" provides the following functions and/or methods:
27
28 "query"
29
30 Query various attributes of the MPM
31
32 my $query = Apache2::MPM->query($const);
33
34 obj: $class ( "Apache2::MPM class" )
35 the class name
36
37 arg1: $const ( "Apache2::Const :mpmq group constant" )
38 The MPM attribute to query.
39
40 ret: $query ( boolean )
41 the result of the query
42
43 since: 2.0.00
44
45 For example to test whether the mpm is static:
46
47 use Apache2::Const -compile => qw(MPMQ_STATIC);
48 if (Apache2::MPM->query(Apache2::Const::MPMQ_STATIC)) { ... }
49
50 "is_threaded"
51
52 Check whether the running Apache MPM is threaded.
53
54 my $is_threaded = Apache2::MPM->is_threaded;
55
56 obj: $class ( "Apache2::MPM class" )
57 the class name
58
59 ret: $is_threaded ( boolean )
60 threaded or not
61
62 since: 2.0.00
63
64 Note that this functionality is just a shortcut for:
65
66 use Apache2::Const -compile => qw(MPMQ_IS_THREADED);
67 my $is_threaded = Apache2::MPM->query(Apache2::Const::MPMQ_IS_THREADED);
68
69 "show"
70
71 What mpm is used
72
73 my $mpm = Apache2::MPM->show();
74
75 obj: $class ( "Apache2::MPM class" )
76 the class name
77
78 ret: $mpm ( string )
79 the name of the MPM. e.g., "Prefork".
80
81 since: 2.0.00
82
84 mod_perl 2.0 documentation.
85
87 mod_perl 2.0 and its core modules are copyrighted under The Apache
88 Software License, Version 2.0.
89
91 The mod_perl development team and numerous contributors.
92
93
94
95perl v5.8.8 2006-11-19 docs::api::Apache2::MPM(3)