Skip Menu |

This queue is for tickets about the Apache-Test CPAN distribution.

Report information
The Basics
Id: 79207
Status: new
Priority: 0/
Queue: Apache-Test

People
Owner: Nobody in particular
Requestors: dorian [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.38
Fixed in: (no value)



Subject: Attempt to replace @src_dir@ croaks [PATCH]
It appears that @src_dir@ does not get populated, and that in turn causes the macro replacement to die with an uninitialized value error. I've attached a patch that defaults the value to LIBEXECDIR from apxs. I should note that what I'm actually trying to do is load arbitrary C modules from LIBEXECDIR, and src_dir appears to be the most appropriate variable to carry that information. Note, however, I'm not married to the idea. If there's a better way to load arbitrary C modules into the test server, I'm happy to use it. Either way, @src_dir@ should probably have a default value. (Googling around I also found this: http://sisyphus.ru/en/srpm/Branch4/apache2-mod_perl/patches/2 , which introduces an @apache_moduledir@ placeholder, but I'm guessing they didn't send the patch upstream.)
Subject: 2012-08-24-Apache-Test-djt.diff
diff -ur Apache-Test-1.38/lib/Apache/TestConfig.pm Apache-Test-1.38-djt/lib/Apache/TestConfig.pm --- Apache-Test-1.38/lib/Apache/TestConfig.pm 2011-12-25 19:39:51.000000000 -0800 +++ Apache-Test-1.38-djt/lib/Apache/TestConfig.pm 2012-08-24 19:54:01.000000000 -0700 @@ -277,14 +277,16 @@ #help to find libmodperl.so unless ($vars->{src_dir}) { - my $src_dir = catfile $vars->{top_dir}, qw(.. src modules perl); - - if (-d $src_dir) { - $vars->{src_dir} = $src_dir; - } else { - $src_dir = catfile $vars->{top_dir}, qw(src modules perl); - $vars->{src_dir} = $src_dir if -d $src_dir; - } + # make sure src_dir gets populated with something sane + my @smp = qw(src modules perl); + for my $src_dir (catfile($vars->{top_dir}, '..', @smp), + catfile($vars->{top_dir}, @smp), + $self->apxs('LIBEXECDIR')) { + if (-d $src_dir) { + $vars->{src_dir} = $src_dir; + last; + } + } } $vars->{t_dir} ||= catfile $vars->{top_dir}, 't';