perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: cvs commit: modperl-2.0/xs/maps
Date Mon, 02 Feb 2004 20:32:55 GMT
Geoffrey Young wrote:
>>>  Apache::LOG_MARK() is now Apache::Log::LOG_MARK()
>>So it shouldn't be called LOG_MARK, it's an ugly duplication: Log::LOG
>>How about Apache::Log::MARK?
> I thought about that, but we currently use Apache::Log::LOG_ERR,
> Apache::Log::LOG_DEBUG, etc for the constants, so I figured to keep the LOG_
> prefix for LOG_MARK.  of course, it's rather confusing that LOG_MARK is
> itself a function, so if we're going to take away the LOG_ prefix I'd rather
> call it Apache::Log::mark() so that it's clear it's a function.

we could s/Apache::Log::LOG_DEBUG/Apache::Log::DEBUG/ as well (and the rest), 
but if you import the constant, then it's confusing not to have the LOG_ prefix.

I guess Doug called LOG_MARK the same way as the log constants, so it'll look 
like a constant.

I wonder why do we need it at all:

static XS(MPXS_Apache__Log_LOG_MARK)
     ax = ax; /* -Wall */;

         COP *cop = PL_curcop;

         if (items) {
             Perl_croak(aTHX_ "usage %s::%s()", mpxs_cv_name());

         EXTEND(SP, 2);

it just returns __FILE__, __LINE__, nothing special to logging. I suppose the 
only reason it sinked into the mp2 API is because Apache uses APLOG_MARK macro:

#define APLOG_MARK __FILE__,__LINE__

in calls to ap_log_*

I don't know what's the best route to take here, but Apache::Log::LOG_ reads ugly.

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message