httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: More basics on the perl-framework stuff..
Date Thu, 13 Dec 2001 03:36:53 GMT
On Thu, 13 Dec 2001, Stas Bekman wrote:

> agreed, but the other suggestion to check the first line of .t is too 
> restrictive.

how so?  the first line thing is just to say 'scan this file'.  if the
magic isn't on the first line, the file isn't scanned.
 
> Also when you want to get to the CONFIGURE section you have to require() 
> the file, which means it'll run the code in it, which is not good. 
> (compare with .pm, where everything is made of functions).

right.  so we do it different from .pm's and just eval the 'sub CONFIGURE
{...}' part.  and for good luck, as part of the eval we can toss in:
use Apache::Test;
use Apache::TestUtil;
etc.

if the CONFIGURE sub needs anything else, it can 'require' it.  no more
painful to the user than having it another file.

> Also notice that Ken's request is different from what CONFIGURE does. 
> CONFIGURE doesn't add stuff to .conf, the __DATA__ section does. 

i know that.  i brought CONFIGURE into the conversation because if we're
going to scan .t's for __DATA__ we might as well look for CONFIGURE too
while we're there.



Mime
View raw message