Herbert Rosmanith wrote:
>>Herbert, this is already documented here:
>>http://perl.apache.org/release/docs/2.0/user/compat/compat.html#C_log_reason___
> 
> 
> 
> it says: 
>   log_reason() has been replaced with a set of dedicated functions:
>   Apache::RequestRec::log_error(), Apache::ServerRec::log_error(),
>   Apache::Log::info() and others.

I'll improve the doc:

You should use:

     Apache->server->log_error("test3.pm::BEGIN");

if you don't have $r, or $r->log_error() inside the handler.

I don't think this is any different from 1.0

> package test3;
> 
> use strict;
> 
> use Apache2;
> use Apache::compat;
> 
> use Apache::RequestRec();
> use Apache2::Apache::RequestRec();
> use Apache::Connection;
> use Apache::Constants qw(:common);
> use Apache::Log();
> use Apache2::APR::Table();

drop those Apache2:: prefixes!

> BEGIN {
>         print("test3.pm::BEGIN\n");
>         Apache::log_error("test3.pm::BEGIN");
> }

But why do you put it inside BEGIN? Apache::compat is not loaded before 
that. Why don't you put it inside startup.pl or httpd.conf?

> The compat-mode should only need you to include two lines:
> use Apache2;
> use Apache::compat;
> and no additional modifications. Otherwise, it would be a
> "not-so-compat-mode", correct?  ;-)

yes, but you should put them at the startup.

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to