On Mon, 1 Apr 2002, Michael G Schwern wrote:

> So... what is it you were doing with the test* methods and how?  Let's
> see what we can preserve.

I was doing this:

    my $test = $self->SUPER::test(@_);

    # %MY::APACHE is set in makeconfig.pl.
    # If we are not going to test with Apache there is no harm in
    # setting this anyway.

    # The PORT env var is used by Apache::test.  Don't delete it!
    my $port = $MY::APACHE{port} || 8228;
    $MY::APACHE{apache_dir} ||= '';

    # This works for older MakeMakers
    $test =~ s/(runtests \@ARGV;)/\$\$ENV{MASON_VERBOSE} = \$(TEST_VERBOSE) ? 
\$(TEST_VERBOSE) : \$\$ENV{MASON_VERBOSE};
\$\$ENV{PORT}=$port; \$\$ENV{APACHE_DIR}=q^$MY::APACHE{apache_dir}^; $1/;

This is part of the Mason Makefile.PL.  The goal here is to set some $ENV
variables before the tests are run so that the tests can get at them
later.

I do the same thing with Alzabo.  I suppose I could have done this by
writing a file and then reading it before each test as well, but the MM
docs, as you pointed out, do encourage this sort of thing.

> over the years on MakeMaker, otherwise we may as well just freeze
> MakeMaker where it is and work on Module::Build. [1]  We can't even

Sounds good to me.  I hate MakeMaker.  With Module::Build it is much
easier to do the sort of stuff I need to do.


-dave

/*==================
www.urth.org
we await the New Sun
==================*/

Reply via email to