mod_perl: Apache2::Status – Embedded interpreter s…
The Apache2::Status module provides some information about the status of the Perl interpreter embedded in the server.
Configure 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 that under the «modperl» core handler the Environment menu option will show only the environment under that handler. To see the environment seen by handlers running under the «perl-script» core handler, configure Apache2::Status as:
<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 like so:
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).
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.