]> iEval git - gruntmaster-data.git/commitdiff
Make tools connect to $ENV{GRUNTMASTER_DSN} if it exists
authorMarius Gavrilescu <marius@ieval.ro>
Thu, 15 May 2014 13:01:28 +0000 (16:01 +0300)
committerMarius Gavrilescu <marius@ieval.ro>
Thu, 15 May 2014 13:01:28 +0000 (16:01 +0300)
gruntmaster-contest
gruntmaster-job
gruntmaster-problem

index ff121cddaefed32dad808978b4920a381627a33c..856faae6d7698fbc08b396ccb6f07defd7b92444 100755 (executable)
@@ -9,7 +9,8 @@ use Date::Parse qw/str2time/;
 
 ##################################################
 
-my $db = Gruntmaster::Data->connect('dbi:Pg:');
+my $dsn = $ENV{GRUNTMASTER_DSN} // 'dbi:Pg:';
+my $db = Gruntmaster::Data->connect($dsn);
 
 sub cmd_help{
        exec perldoc => $0
index 126e1d0dea36772fb0d168410f43f36310cc1197..06e3fe14d44edb51f091df1ad96b0a2a839da13e 100755 (executable)
@@ -8,7 +8,8 @@ use POSIX qw/strftime/;
 
 ##################################################
 
-my $db = Gruntmaster::Data->connect('dbi:Pg:');
+my $dsn = $ENV{GRUNTMASTER_DSN} // 'dbi:Pg:';
+my $db = Gruntmaster::Data->connect($dsn);
 
 sub cmd_help{
        exec perldoc => $0
index afcb1be7135e065fdc342d694a0297bd328f0f11..b942897ac41d12388c93b4427474dd0c34a94db0 100755 (executable)
@@ -11,7 +11,8 @@ use Getopt::Long qw/:config require_order/;
 
 ##################################################
 
-my $db = Gruntmaster::Data->connect('dbi:Pg:');
+my $dsn = $ENV{GRUNTMASTER_DSN} // 'dbi:Pg:';
+my $db = Gruntmaster::Data->connect($dsn);
 
 sub cmd_help{
        exec perldoc => $0
This page took 0.025359 seconds and 4 git commands to generate.