diff options
author | Robert Haas | 2009-05-24 02:19:55 +0000 |
---|---|---|
committer | Robert Haas | 2009-05-24 02:19:55 +0000 |
commit | ac388f52de42c45c1da5f5d99c86d2f6cc1adb12 (patch) | |
tree | 7923854f8e8f0c09125d1aa88d728b5fdbedb4f9 | |
parent | c393c68db3df467ee02dbc83aad4662e36cc7629 (diff) |
Allow override of DB to use via environment variable PGCOMMITFEST_DB.
-rw-r--r-- | perl-lib/PgCommitFest/Request.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-lib/PgCommitFest/Request.pm b/perl-lib/PgCommitFest/Request.pm index ae38399..2a2893d 100644 --- a/perl-lib/PgCommitFest/Request.pm +++ b/perl-lib/PgCommitFest/Request.pm @@ -12,8 +12,9 @@ die "Must set PGCOMMITFEST_ROOT to root directory of installation!\n" our $ROOT = $ENV{'PGCOMMITFEST_ROOT'}; our $template = Template->new({ 'INCLUDE_PATH' => $ROOT . '/template', 'FILTERS' => { 'htmlsafe' => \&PgCommitFest::WebControl::escape } }); -our $PG = 'dbi:Pg:dbname=pgcommitfest'; -our $PGUSERNAME = 'pgcommitfest'; +our $PG = defined $ENV{'PGCOMMITFEST_DB'} ? $ENV{'PGCOMMITFEST_DB'} + : 'dbi:Pg:dbname=pgcommitfest user=pgcommitfest'; +our $PGUSERNAME = ''; our $PGPASSWORD = ''; $CGI::POST_MAX = 65536; $CGI::DISABLE_UPLOADS = 1; # No need for uploads at present. |