cc'ing david :)

Tyler MacDonald wrote:
>       I've been working on a mod_perl extension, tested with Apache::Test.
> I was running 1.27 before and everything was working great. I upgraded to
> 1.28 because I wanted to run the 'testcover' action. Now if I run my tests
> (using "./Build test", "testcover", or "perl t/TEST"), I get the following
> output:
> 
> [warning] setting ulimit to allow core files
> ulimit -c unlimited; /usr/bin/perl /home/faraway/dev/Apache2-AUS/t/TEST
> -bugreport -verbose=0
> Use of uninitialized value in open at
> /usr/local/lib/perl/5.8.8/Apache/TestServer.pm line 315.

I've seen this recently as well, but I don't think it's primarily an
Apache-Test issue.  at least not a code-based one - I think it happens when
stale A-T files are left lying around and are reused under various
circumstances...

so, I think you need to nuke Apache-Test files.  my recipe for this is

  $ make realclean (or whatever the M::B equivalent is)
  $ t/TEST -clean
  $ rm -rf ~/.apache-test/
  $ rm t/conf/apache_test_config.pm t/conf/httpd.conf t/conf/extra.conf
  $ rm t/TEST

if any of those fails it's ok - we're just cleaning up the leftovers :)

now, try from the start again.  if you have trouble, check
apache_test_config.pm and make sure it looks like it contains the right data
(right httpd path, right t_pid_file, etc).

HTH

--Geoff

> 
>       And nothing else happens.
> 
>       This *only* happens with Apache2::AUS, which uses Module::Build. My
> MakeMaker-based modules test fine. I've attached my Build.PL; if you want to
> look at anything else in the distribution, let me know and I'll send it
> over.
> 
>       Thanks,
>               Tyler
> 
> 
> 
> ------------------------------------------------------------------------
> 
> #!/usr/bin/perl
> 
> use 5.006;
> use strict;
> use warnings;
> use lib 'lib';
> use Module::Build;
> 
> our %opts = (
>     module_name         =>  'Apache2::AUS',
>     license             =>  'perl',
>     requires            =>  {
>         'DBIx::Migration::Directories'  =>      '0.01',
>         'mod_perl2'                     =>      '2.000001',
>         'Schema::RDBMS::AUS'            =>      '0.01',
>         'Apache2::Request'              =>      '2.06',
>     },
>     build_requires      =>  {
>         'Module::Build'                 =>      '0.27_03',
>         'Apache::TestMB'                =>      '0',
>         'Schema::RDBMS::AUS'            =>      '0.01',
>         'DBIx::Migration::Directories'  =>      '0.01',
>         'mod_perl2'                     =>      '2.000001',
>         'DBIx::Transaction'             =>      '0.006',
>     },
>     create_makefile_pl  =>  'passthrough',
> );
> 
> eval { require Apache::TestMB; };
> 
> my $build;
> 
> if($@) {
>     $build = Module::Build->new(%opts, installdirs => {});
>     print <<"EOT";
> *** Apache::TestMB is required to build this module!
> 
>     This is supplied by the mod_perl2 package.
>     Once you have installed this package, you may have to run "Build.PL"
>     again. If you are installing from CPAN, you may need to quit and
>     re-enter your CPAN shell.
> 
> EOT
>     $build->prompt("Press enter to continue", ".");
> } else {
>     $build = Apache::TestMB->new(%opts);
> }
> 
> print qq{Example DSN: "DBI:mysql:database=test"\n};
> if($build->notes(DBI_DSN => $build->prompt(
>     "What DSN should we use for database tests? (Enter '0' to skip DB tests)",
>     exists $ENV{DBI_DSN} ? $ENV{DBI_DSN} : 0
> ))) {
>     $build->notes(DBI_USER => $build->prompt(
>         "Username for the database connection:", $ENV{DBI_USER}
>     ));
>     $build->notes(DBI_PASS => $build->prompt(
>         "Password for the database connection:", $ENV{DBI_PASS}
>     ));
> } else {
>     $build->notes(DBI_USER => undef);
>     $build->notes(DBI_PASS => undef);
> }
> 
> $build->create_build_script;

Reply via email to