Return-Path: Delivered-To: apmail-httpd-test-dev-archive@httpd.apache.org Received: (qmail 52217 invoked by uid 500); 13 Dec 2001 03:31:38 -0000 Mailing-List: contact test-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-dev@httpd.apache.org Received: (qmail 52205 invoked from network); 13 Dec 2001 03:31:37 -0000 X-Authentication-Warning: mako.covalent.net: dougm owned process doing -bs Date: Wed, 12 Dec 2001 19:36:53 -0800 (PST) From: Doug MacEachern X-Sender: dougm@localhost To: test-dev@httpd.apache.org Subject: Re: More basics on the perl-framework stuff.. In-Reply-To: <3C181C46.3090300@stason.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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.