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 ? > 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> 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. -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
signature.asc
Description: OpenPGP digital signature
