httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: [PATCH] Test & TestRequest pod
Date Thu, 02 Dec 2004 16:16:45 GMT
Christopher H. Laco wrote:

> On that note, what else can I work on?
> Apparently I'm a glutton for punishment.

Not sure, there are all kind of things in the ToDo file, but they all 
mostly obscure.

I think all kind of refactoring would be great. One thing I wanted to do 
for tests again vhosts, is to add this function next to module2path():

   sub module2url {
      my $module = shift;
      my $scheme = shift || "http";

      my $config   = Apache::Test::config();
      my $hostport = Apache::TestRequest::hostport($config);
      my $path     = Apache::TestRequest::module2path($module);
      return "$scheme://$hostport$path";

and then replace the long craft used a lot in the modperl tests, so now 
one can write a simple:

   my $module = "Foo::bar";
      my $path = Apache::TestRequest::module2path($module);
      GET $path; # GET "/Foo__bar"
     my $url      = Apache::TestRequest::module2url($module);
     GET $url; # GET "http://localhost:8545/Foo__bar"

grep modperl-2.0/t for Apache::TestRequest::hostport to see what I'm 
talking about.

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

View raw message