On Mon, Apr 01, 2002 at 09:46:42AM -0600, Dave Rolsky wrote:
> 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.
Hmmm. This can't be preserved. Wouldn't it be a lot less magical to
just put the %ENV logic into your tests, or a library in t/lib which
your tests use?
Setting $ENV{MASON_VERBOSE} off TEST_VERBOSE, OTOH, is tricky. How
does one do it in Module::Build?
> > 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.
No argument there. You've got my vote for Module::Build in 5.8.1.
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Perl Quality Assurance <[EMAIL PROTECTED]> Kwalitee Is Job One
"None of our men are "experts."... because no one ever considers
himself expert if he really knows his job."
-- From Henry Ford Sr., "My Life and Work," p. 86 (1922):