You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-dev@httpd.apache.org by "Christopher H. Laco" <cl...@chrislaco.com> on 2004/12/08 04:50:24 UTC

[PATCH] module2path/module2url pod

Here's my first crack at pod for module2path and module2url.
I decided to put it at the end of the FUNCTONS head1. It didn't seem to 
make much sense at the beginning and it felt like I should keep focus on 
the exported functions.

Let me know if you had something else in mind and I'll rework it.

-=Chris

Re: httpd-test problems on win32

Posted by Stas Bekman <st...@stason.org>.
[change the subject to reflect the discussed topic]

Christopher H. Laco wrote:

> I'm going to put this on hold for a bit. I can't get a remotely clean 
> make test.
> 
> Aside from test failures, I'm fighting this if mod_rewrite is loaded:
> 
> [Wed Dec 08 20:02:01 2004] [error] (OS 193)%1 is not a valid Win32 
> application.  : mod_rewrite: could not startup RewriteMap program (null)

Can't help you here. Any win32 guru here? wrowe?

> and this when it's not:
> 
> waiting 60 seconds for server to start: .Syntax error on line 243 of 
> C:/Development/httpd-test/perl-framework/t/conf/extra.conf:
> Invalid ScriptLog path 
> C:/Development/httpd-test/perl-framework/t/logs/mod_cgi.log

That's bizarre. What do you have in t/conf/extra.conf? It should be 
something like:

<IfModule mod_cgi.c>
     AddHandler cgi-script .sh
     AddHandler cgi-script .pl
     ScriptLog 
/home/stas/apache.org/httpd-test/perl-framework/t/logs/mod_cgi.log
     ScriptLogLength 8192
     ScriptLogBuffer 256

so if you don't have that module available (loaded), it shouldn't give you 
this error.

> I even went to far as to uninstall every piece of Apache/Apache2 and 
> perl 5.6.1/5.8.4 and reinstall Apache2/5.8.4 letting it setup the ENV 
> variables so it was the only perl.
> 
> Maybe if I get more energy on my day off Friday I'll take another crack 
> at it. Time for some HL2. :-)

FWIW, I get two tests failing
t/apache/limits.t                 10    2  20.00%  7 9
t/modules/include.t               82    1   1.22%  49

-- 
__________________________________________________________________
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

Re: [PATCH] module2path/module2url pod

Posted by "Christopher H. Laco" <cl...@chrislaco.com>.
Stas Bekman wrote:
> Christopher H. Laco wrote:
> 
>> Shouldn't that be:
>>
>> Index: TestRequest.pm
> 
> 
>> -  $url = Apache::TestRequest::module2url($module, %options);
>> +  $url = Apache::TestRequest::module2url($module, \%options);
> 
> 
> Thanks Chris, fixed.
> 
>> Any other grunt work can work on?
> 
> 
> if you didn't get tired from module2url manipulations, there are a few 
> tests in the httpd-test repository that could use the same refactoring. 
> This is the repository used by the httpd project. To exract it do:
> 
> svn checkout http://svn.apache.org/repos/asf/httpd/test/trunk/ httpd-test
> 
> it lives in httpd-test/perl-framework/t/
> 
> Other than that, I'm going to commit soon a new test framework that 
> tests Apache-Test config itself, so you may want to help out with that, 
> once it's in. You are on the test-cvs@httpd.apache.org list, right? That 
> list shows all the commits to the httpd-test project (which includes 
> Apache-Test).
> 
> 
I'm going to put this on hold for a bit. I can't get a remotely clean 
make test.

Aside from test failures, I'm fighting this if mod_rewrite is loaded:

[Wed Dec 08 20:02:01 2004] [error] (OS 193)%1 is not a valid Win32 
application.  : mod_rewrite: could not startup RewriteMap program (null)


and this when it's not:

waiting 60 seconds for server to start: .Syntax error on line 243 of 
C:/Development/httpd-test/perl-framework/t/conf/extra.conf:
Invalid ScriptLog path 
C:/Development/httpd-test/perl-framework/t/logs/mod_cgi.log


I even went to far as to uninstall every piece of Apache/Apache2 and 
perl 5.6.1/5.8.4 and reinstall Apache2/5.8.4 letting it setup the ENV 
variables so it was the only perl.

Maybe if I get more energy on my day off Friday I'll take another crack 
at it. Time for some HL2. :-)

-=Chris

Re: [PATCH] module2path/module2url pod

Posted by "Christopher H. Laco" <cl...@chrislaco.com>.
Stas Bekman wrote:
[snip]
> if you didn't get tired from module2url manipulations, there are a few 
> tests in the httpd-test repository that could use the same refactoring. 
> This is the repository used by the httpd project. To exract it do:
> 
> svn checkout http://svn.apache.org/repos/asf/httpd/test/trunk/ httpd-test
> 
> it lives in httpd-test/perl-framework/t/
> 
> Other than that, I'm going to commit soon a new test framework that 
> tests Apache-Test config itself, so you may want to help out with that, 
> once it's in. You are on the test-cvs@httpd.apache.org list, right? That 
> list shows all the commits to the httpd-test project (which includes 
> Apache-Test).
> 
> 


Great. ANOTHER list. My brain hurts :-)
I'll start looking at the those tests tonight.

Thanks,
-=Chris

Re: [PATCH] module2path/module2url pod

Posted by Stas Bekman <st...@stason.org>.
Christopher H. Laco wrote:

> Shouldn't that be:
> 
> Index: TestRequest.pm

> -  $url = Apache::TestRequest::module2url($module, %options);
> +  $url = Apache::TestRequest::module2url($module, \%options);

Thanks Chris, fixed.

> Any other grunt work can work on?

if you didn't get tired from module2url manipulations, there are a few 
tests in the httpd-test repository that could use the same refactoring. 
This is the repository used by the httpd project. To exract it do:

svn checkout http://svn.apache.org/repos/asf/httpd/test/trunk/ httpd-test

it lives in httpd-test/perl-framework/t/

Other than that, I'm going to commit soon a new test framework that tests 
Apache-Test config itself, so you may want to help out with that, once 
it's in. You are on the test-cvs@httpd.apache.org list, right? That list 
shows all the commits to the httpd-test project (which includes Apache-Test).


-- 
__________________________________________________________________
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

Re: [PATCH] module2path/module2url pod

Posted by "Christopher H. Laco" <cl...@chrislaco.com>.
Stas Bekman wrote:
> Christopher H. Laco wrote:
> 
>> Here's my first crack at pod for module2path and module2url.
>> I decided to put it at the end of the FUNCTONS head1. It didn't seem 
>> to make much sense at the beginning and it felt like I should keep 
>> focus on the exported functions.
> 
> 
> There is already one head1 FUNCTIONS there.
> 
> I've called your header:
> 
>   =head2 URL Manipulation Functions
> 
> since all function in this module are 'helper functions' :)
> 
>> Let me know if you had something else in mind and I'll rework it.
> 
> 
> Looks good. I've massaged it a bit and commited.
> 
> Thanks Chris.
> 
Shouldn't that be:

Index: TestRequest.pm
===================================================================
--- TestRequest.pm	(revision 111269)
+++ TestRequest.pm	(working copy)
@@ -1121,7 +1121,7 @@
  =head3 C<module2url>

    $url = Apache::TestRequest::module2url($module);
-  $url = Apache::TestRequest::module2url($module, %options);
+  $url = Apache::TestRequest::module2url($module, \%options);

  Convert a module name to a full URL including the current
  configurations C<hostname:port> and sets C<module> accordingly.


Maybe it's just me. The former leads me to believe that I might be able 
to do:
	module2url('MyMod::Test',
		scheme => 'https', path => '/merge3/');
instead of
	module2url('MyMod::Test',
		{scheme => 'https', path => '/merge3/'});
while the later make that more clear.

Any other grunt work can work on?
-=Chris

Re: [PATCH] module2path/module2url pod

Posted by Stas Bekman <st...@stason.org>.
Christopher H. Laco wrote:
> Here's my first crack at pod for module2path and module2url.
> I decided to put it at the end of the FUNCTONS head1. It didn't seem to 
> make much sense at the beginning and it felt like I should keep focus on 
> the exported functions.

There is already one head1 FUNCTIONS there.

I've called your header:

   =head2 URL Manipulation Functions

since all function in this module are 'helper functions' :)

> Let me know if you had something else in mind and I'll rework it.

Looks good. I've massaged it a bit and commited.

Thanks Chris.

-- 
__________________________________________________________________
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