On Tuesday 08 April 2008 07:26:55 am Jeff Armstrong wrote:

> Folks,
>
> <http://perl.apache.org/docs/2.0/api/Apache2/ServerUtil.html#C_get_server_d
>escription_> indicates that I should be able to:
>    $description  = Apache2::ServerUtil::get_server_description();
>
> however, I find that
>    Apache2::ServerUtil::get_server_description();
>    Apache2::ServerUtil::get_server_banner();
>
> warn => Undefined subroutine
>
> and
>    Apache2::ServerUtil->user_id;
>    Apache2::ServerUtil->group_id;
>
> warn => Can't locate object method
>
> Are the docs incorrect, or am I doing the wrong thing?

Did you remember to "use Apache2::ServerUtil"? It's probably obvious, but it's 
easy to miss sometimes - mod_perl doesn't pull in all the APIs automatically, 
just what you specify (to avoid memory overhead for things you don't use). 


> Has anyone already written an equivalent of phpinfo() which basically 
> dumps out everything-you-might-want-to-know about the current OS, 
> server, request, cookies, environment and connection?

Does Apache2::Status (http://perl.apache.org/docs/2.0/api/Apache2/Status.html)
give you want you want?

Reply via email to