Philippe M. Chiasson wrote:
Stas Bekman wrote:
[EMAIL PROTECTED] 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:[EMAIL PROTECTED] 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]