Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use t::Config

  • Loading branch information...
commit 46afe5179e030c67e0519264f4a06ebe56d04dde 1 parent 027a9c6
@spiritloose authored
View
1  .gitignore
@@ -10,3 +10,4 @@ Makefile
/config.log
/config.status
/configure
+/t/Config.pm
View
2  configure.ac
@@ -33,7 +33,7 @@ if test "$PERL" = no; then
fi
AC_SUBST(PERL)
-AC_OUTPUT([Makefile t/Makefile])
+AC_OUTPUT([Makefile t/Makefile t/Config.pm])
echo "
$PACKAGE_NAME $PACKAGE_VERSION configuration:
View
9 t/Config.pm.in
@@ -0,0 +1,9 @@
+package t::Config;
+use strict;
+use warnings;
+
+our $APXS = '@APXS@';
+
+1;
+__END__
+
View
3  t/Makefile.in
@@ -1,6 +1,5 @@
-APXS=@APXS@
TESTS=.
all: test
test:
- APXS=$(APXS) prove -I.. $(TESTS)
+ prove -I.. $(TESTS)
.PHONY: test
View
8 t/TestModPSGI.pm
@@ -3,6 +3,7 @@ use strict;
use warnings;
use Test::Base -Base;
+use t::Config;
use File::Basename;
use URI::Escape;
use List::Util qw(sum);
@@ -103,9 +104,10 @@ our $TestFile;
sub run_httpd($) {
my $port = shift;
my $tmpdir = $ENV{APACHE2_TMP_DIR} || File::Temp::tempdir(CLEANUP => 1);
- chomp(my $libexecdir = `$ENV{APXS} -q libexecdir`);
- chomp(my $sbindir = `$ENV{APXS} -q sbindir`);
- chomp(my $progname = `$ENV{APXS} -q progname`);
+ my $apxs = $t::Config::APXS;
+ chomp(my $libexecdir = `$apxs -q libexecdir`);
+ chomp(my $sbindir = `$apxs -q sbindir`);
+ chomp(my $progname = `$apxs -q progname`);
my $httpd = "$sbindir/$progname";
my $conf = <<"END_CONF";
LoadModule psgi_module $libexecdir/mod_psgi.so
Please sign in to comment.
Something went wrong with that request. Please try again.