httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigC.pm
Date Sat, 06 Mar 2004 02:01:13 GMT
coar@apache.org wrote:
> coar        2004/03/05 08:54:19
> 
>   Modified:    perl-framework/Apache-Test/lib/Apache TestConfigC.pm
>   Log:
>   too many assumptions that things will stay the same

>   -    if ($dversion eq '-DAPACHE1') {
>   +    if ($dversion =~ 'APACHE1') {

Well dversion is generated by A-T and it's "-D APACHE$self->{rev}", why taking 
chances and match partial strings? What assumptions are you talking about, 
when both live inside the same package.

And it seems to be awkward at all, since what you are really after is:

   if ($self->server->{rev} == 1)

perhaps add an accessor:

   sub rev { shift->{rev} }

in TestServer.pm to make it nicer. Now you need to make no assumptions.


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

Mime
View raw message