Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigC.pm
Rodent of Unusual Size wrote: Stas Bekman wrote: 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) indeed, a much better solution. however, i suspect it's obvious only to one as steeped in the code as yourself' i wasn't interested in hunting through all the code to find out where the symbol was evolved; past attempts to do things like that have been frustrating. so thanks! agreed, so please go ahead and use a cleaner version. btw, the documentation joe mentioned to me is under perl.apache.org -- which is cool, but i think it would be cooler still if there were a link to it from http://httpd.apache.org/test/ ... which is where i went to look for it. I don't have commit access to that area, so if you can add it that would be great. -- __ Stas BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigC.pm
Stas Bekman wrote: > > 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) indeed, a much better solution. however, i suspect it's obvious only to one as steeped in the code as yourself' i wasn't interested in hunting through all the code to find out where the symbol was evolved; past attempts to do things like that have been frustrating. so thanks! btw, the documentation joe mentioned to me is under perl.apache.org -- which is cool, but i think it would be cooler still if there were a link to it from http://httpd.apache.org/test/ ... which is where i went to look for it. -- #kenP-)} Ken Coar, Sanagendamgagwedweinini http://Ken.Coar.Org/ Author, developer, opinionist http://Apache-Server.Com/ "Millennium hand and shrimp!"
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigC.pm
[EMAIL PROTECTED] wrote: coar2004/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 BekmanJAm_pH --> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigC.pm
Geoffrey Young wrote: >> +my $dversion = $self->server->dversion; > >> +if ($dversion eq '-DAPACHE1') { > > that's '-D APACHE1' in current cvs, no? so i saw, when my tests blew up. -- #kenP-)} Ken Coar, Sanagendamgagwedweinini http://Ken.Coar.Org/ Author, developer, opinionist http://Apache-Server.Com/ "Millennium hand and shrimp!"
Re: cvs commit: httpd-test/perl-framework/Apache-Test/lib/Apache TestConfigC.pm
> +my $dversion = $self->server->dversion; > +if ($dversion eq '-DAPACHE1') { that's '-D APACHE1' in current cvs, no? --Geoff