On Wed, 20 Jun 2001, Stas Bekman wrote:
> > looks good, but i would change the first part to:
> > *expand = HAS_DUMPER ? sub { map { ... } } : sub { @_ };
>
> can you please explain why yours is better?
easier to read and expand() could be used outside the module whereas
my $expand cannot.
> I've also sent an email to Michael Schwern asking him whether he would
> like to integrate it into Test::Harness.
of course, this stuff doesn't really fit under Test:: either. we're not
testing anything, just tracing messages. i see it being more useful in
the build than the 'make test'. Log::Trace or something maybe, but i
would still stick with Apache::TestTrace for now and worry about the name
later, Apache::Trace can just become a wrapper around it.
> we cannot really use the import() trick here if we want to be able to rely
> on %opts.
nah, i wouldn't bother with import. the level should normally just be set
once.
> Also we might want to raise the level only for a specific code section,
> since we might want to debug only a specific code snippet:
yes indeed.
> Another possibility is to use package's global to make the level tweaking:
>
> {
> local $Apache::TestTrace::LEVEL = 'debug';
> ...
> }
> # $Apache::TestTrace::LEVEL gets restored to the previous value
that would be the most handy. can we do Level rather than LEVEL? i like
$StudlyCaps style for global variables that are 'public'.
> but then we will have to decide for each trace function whether to do
> something or to be NOP at run-time.
that's fine, we don't need to worry that much about speed with this
module. in general for the configure/build/xs-generation/test modules,
anything that is not actually used inside mod_perl we should prefer
usefulness over speed.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]