libapa...:Status(3pm)

🌸 NAME 🌸

okay so bestie, this page is libapa...:Status(3pm) from the User Contributed Perl Documentation, and it's all about Apache2::Status β€” embedded interpreter status information ✨ like, it tells you what's going on inside the Perl interpreter that's vibing inside your server 🫢


πŸŽ€ SYNOPSIS πŸŽ€

here's the setup, literally copy-paste coded:

<Location /perl-status>

    # disallow public access
    Order Deny, Allow
    Deny from all
    Allow from 127.0.0.1

    SetHandler modperl
    PerlOptions +GlobalRequest
    PerlResponseHandler Apache2::Status
</Location>

or, the other way:

<Location /perl-status>

    # disallow public access
    Order Deny, Allow
    Deny from all
    Allow from 127.0.0.1

    SetHandler perl-script
    PerlResponseHandler Apache2::Status
</Location>

pick your fighter, both slay πŸ’…


πŸ’œ DESCRIPTION πŸ’œ

so the Apache2::Status module hands you some information about the status of the Perl interpreter embedded in the server. that's the whole point, no cap πŸ‘‘

configure it like so:

<Location /perl-status>

    # disallow public access
    Order Deny, Allow
    Deny from all
    Allow from 127.0.0.1

    SetHandler modperl
    PerlOptions +GlobalRequest
    PerlResponseHandler Apache2::Status
</Location>

notice β€” fr fr notice this β€” under the modperl core handler, the Environment menu option will only show you the environment under that handler. so if you wanna see the environment as seen by handlers running under the perl-script core handler, you configure Apache2::Status like this instead:

<Location /perl-status>

    # disallow public access
    Order Deny, Allow
    Deny from all
    Allow from 127.0.0.1

    SetHandler perl-script
    PerlResponseHandler Apache2::Status
</Location>

other modules can "plugin" a menu item too, like the way that you can just add your own lil thing, iconic:

require Apache2::Module;
Apache2::Status->menu_item(
    'DBI' => "DBI connections", #item for Apache::DBI module
    sub {
        my ($r, $q) = @_; #request and CGI objects
        my (@strings);
        push @strings,  "blobs of html";
        return \@strings;     #return an array ref
    }
) if Apache2::Module::loaded('Apache2::Status');
⚠️ WARNING: Apache2::Status must be loaded before these modules via the PerlModule or PerlRequire directives (or from startup.pl). like, order matters bestie, do not skip this πŸ’€

a very common setup might be:

Perl Module B::TerseSize

<Location /perl-status>
    SetHandler perl-script
    PerlResponseHandler Apache2::Status
    PerlSetVar StatusOptionsAll On
    PerlSetVar StatusDeparseOptions "-p -sC"
</Location>

due to the implementation of Apache2::Status::noh_fileline in B::TerseSize, you must load B::TerseSize first. them's the rules 🧚


✨ OPTIONS ✨

πŸ‘‘ "StatusOptionsAll"

this one single directive will enable all of the options described below. one directive to rule them all, main character energy:

PerlSetVar StatusOptionsAll On

πŸ“ "StatusDumper"

when you're browsing symbol tables, the values of arrays, hashes and scalars can be viewed via Data::Dumper if this configuration variable is set to On:

PerlSetVar StatusDumper On

πŸ¦‹ "StatusPeek"

with this option On and the Apache::Peek module installed, functions and variables can be viewed ala Devel::Peek style:

PerlSetVar StatusPeek On

🌈 "StatusLexInfo"

with this option On and the B::LexInfo module installed, subroutine lexical variable information can be viewed πŸ‘€

PerlSetVar StatusLexInfo On

πŸ’œ "StatusDeparse"

with this option On, subroutines can be "deparsed".

PerlSetVar StatusDeparse On

options can be passed to B::Deparse::new like so:

PerlSetVar StatusDeparseOptions "-p -sC"

see the B::Deparse manpage for details πŸ’…

🌸 "StatusTerse"

with this option On, text-based op tree graphs of subroutines can be displayed, thanks to B::Terse.

PerlSetVar StatusTerse On

πŸŽ€ "StatusTerseSize"

with this option On and the B::TerseSize module installed, text-based op tree graphs of subroutines and their size can be displayed. see the B::TerseSize docs for more info.

PerlSetVar StatusTerseSize On

πŸ’– "StatusTerseSizeMainSummary"

with this option On and the B::TerseSize module installed, a "Memory Usage" will be added to the Apache2::Status main menu. this option is disabled by default, because it can be rather cpu intensive to summarize memory usage for the entire server 😭 it is strongly suggested that this option only be used with a development server running in -X mode, since the results will be cached.

PerlSetVar StatusTerseSizeMainSummary On

⭐ "StatusGraph"

when StatusDumper is enabled, another link "OP Tree Graph" will be present with the dump if this configuration variable is set to On:

PerlSetVar StatusGraph

this requires the B module (part of the Perl compiler kit) and B::Graph (version 0.03 or higher) module to be installed along with the dot program.

dot is part of the graph visualization toolkit from AT&T: http://www.graphviz.org/.

⚠️ WARNING: some graphs may produce very large images, and some graphs may produce no image at all if B::Graph's output is incorrect. just so you know πŸ™ˆ

🧚 "Dot"

location of the dot program for StatusGraph, if it's somewhere other than /usr/bin or /usr/local/bin

🫢 "GraphDir"

directory where StatusGraph should write it's temporary image files. default is $ServerRoot/logs/b_graphs.


πŸ’… PREREQUISITES πŸ’…

the Devel::Symdump module, version 2.00 or higher. non-negotiable bestie.

other optional functionality requirements: B::Deparse - 0.59, B::Fathom - 0.05, ""B::Graph"" - 0.03.


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


πŸ‘€ SEE ALSO πŸ‘€

perl(1), Apache(3), Devel::Symdump(3), Data::Dumper(3), B(3), "B::Graph"(3), mod_perl 2.0 documentation.


🌟 AUTHORS 🌟

Doug MacEachern with contributions from Stas Bekman β€” legends, periodt πŸ’–


okay bestie that's the whole page, you ate it πŸ“ this was libapa...:Status(3pm), coming to you from the User Contributed Perl Documentation, running on perl v5.42.3, dated 2026-08-20 β€” go forth and status responsibly, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from