perl-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: [PATCH] @NextAvailablePort@ token in conf.in
Date Thu, 27 Oct 2005 00:03:25 GMT
Geoffrey Young wrote:
>>SetVar MyPortFoo @NextAvailablePort@
> 
> 
>>What do you think?
> 
> 
> sounds like a good idea

The reason I was hesitating about going ahead with it, is that I'd love to 
have a way to figure out what was that port number at run time (unless the 
directive took care of it). e.g. with vhost we can get the port number by 
supplying the vhost's name. But I couldn't think of a similar way for this 
feature. May be it could be something like:

   SetVar MyPortFoo @NextAvailablePort:foo_port@

and have Apache::Test store that info, and let for example the client side 
access that info by passing foo_port as an identifier?

>>+       if ($key eq 'nextavailableport') {
>>+           $self->server->select_next_port;
>>+       }
> 
> 
> rather than hard-coding an exception, maybe use some type of coderef map?
> 
> my $non_var_tokens = {
>   nextavailableport => $self->server->can('select_next_port'),
> };
> 
> or somesuch?

Sure

> but +1 on whatever you come up with - this is goodness :)

Thanks.

-- 
_____________________________________________________________
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/


Mime
View raw message