perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: svn commit: r345151 - in /perl/modperl/trunk: Changes src/modules/perl/modperl_cmd.c t/conf/extra.last.conf.in t/hooks/TestHooks/push_handlers_anon.pm t/response/TestDirective/perldo.pm
Date Fri, 18 Nov 2005 02:57:54 GMT
Philippe M. Chiasson wrote:
> Stas Bekman wrote:
> 
>>gozer@apache.org wrote:
>>
>>
>>>Author: gozer
>>>Date: Wed Nov 16 15:53:01 2005
>>>New Revision: 345151
>>>
>>>URL: http://svn.apache.org/viewcvs?rev=345151&view=rev
>>>Log:
>>>Calling Apache2::ServerUtil->server in <Perl> sections now
>>>returns the server into which the <Perl> section was defined
>>
>>
>>This breaks the API, Philippe: Check the definition of
>>Apache2::ServerUtil->server:
>>http://perl.apache.org/docs/2.0/api/Apache2/ServerUtil.html#C_server_
>>It must always return the main server's record.
> 
> 
> I see it's documented as always returning the main server's object, but
> maybe the documentation needs to be fixed instead ?

It's too late, Philippe. 2.0 is out. You can't just go and change API till 
the next generation.

>>I suppose you need to provide some other way to get hold of the right
>>vhost/main server.
> 
> 
> Yeah, the original solution in mp1 was the ugly $Apache::__SERVER scalar
> 
> I looked at the comment about A2::SU->server in the test file, complaining
> about it not returning the current server in <Perl> blocks that I figured it
> would be the right solution.
> 
> So, I can either re-introduce some flacky api for this, like
> 
> <Perl>
>   my $s = Apache2::PerlSections->server;
> </Perl>

+1

> Or we could maybe consider changing the documentation of A2::SU->server? After all,
> this api behavioral difference only exists within <Perl> sections and is certainly
> somewhat more DWIMy IMO.

-1: see above

-- 
_____________________________________________________________
Stas Bekman mailto:stas@stason.org  http://stason.org/
MailChannels: Assured Messaging(TM) http://mailchannels.com/
The "Practical mod_perl" book       http://modperlbook.org/
http://perl.apache.org/ http://perl.org/ http://logilune.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message