From d689a1473977b0aa368590ba1f913521e4f466c7 Mon Sep 17 00:00:00 2001 From: Kent Fredric Date: Tue, 18 Jul 2017 16:02:26 +1200 Subject: [PATCH] Allow custom host/port configurations --- Build.PL | 4 ++-- t/DBTestHarness.pm | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Build.PL b/Build.PL index ecc402e..a61190f 100755 --- a/Build.PL +++ b/Build.PL @@ -97,9 +97,9 @@ sub biosql_conf { or die "Error: could not write to config file '$config_file'\n"; my %config = (driver => $drivers[0], - host => '127.0.0.1', + host => $ENV{GENTOO_DB_HOSTNAME} || '127.0.0.1', user => 'root', - port => 3306, + port => $ENV{GENTOO_DB_PORT} || undef, password => '', dbname => 'bioseqdb', database => 'biosql', diff --git a/t/DBTestHarness.pm b/t/DBTestHarness.pm index b660429..91e0c54 100755 --- a/t/DBTestHarness.pm +++ b/t/DBTestHarness.pm @@ -47,9 +47,9 @@ my $counter=0; # Default settings as a hash my $dflt = { 'driver' => 'mysql', - 'host' => 'localhost', + 'host' => $ENV{GENTOO_DB_HOST} || 'localhost', 'user' => 'root', - 'port' => undef, + 'port' => $ENV{GENTOO_DB_PORT} || undef, 'password' => '', 'schema_sql' => ['../biosql-schema/sql/biosqldb-mysql.sql'], 'database' => 'biosql', -- 2.13.1