X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Debbugs%2FConfig.pm;h=0d0abae37ff6c489f80cd4b7a413f11ba279e92c;hb=466f7faff129a5699c7674f59900a92aa256175d;hp=a02072c65b78565895712f8d09ad554a9635f929;hpb=4225185fc598ac3c92525d6bb8d40456aa136ba6;p=debbugs.git diff --git a/Debbugs/Config.pm b/Debbugs/Config.pm index a02072c..0d0abae 100644 --- a/Debbugs/Config.pm +++ b/Debbugs/Config.pm @@ -76,6 +76,7 @@ BEGIN { qw($gTemplateDir), qw($gDefaultPackage), qw($gSpamMaxThreads $gSpamSpamsPerThread $gSpamKeepRunning $gSpamScan $gSpamCrossassassinDb), + qw($gDatabase), ], text => [qw($gBadEmailPrefix $gHTMLTail $gHTMLExpireNote), ], @@ -1058,6 +1059,22 @@ set_default(\%config,'libravatar_blacklist',[]); =back +=head2 Database + +=over + +=item database + +Name of debbugs PostgreSQL database service. If you wish to not use a service +file, provide a full DBD::Pg compliant data-source, for example: +C<"dbi:Pg:dbname=dbname"> + +=back + +=cut + +set_default(\%config,'database',undef); + =head2 Text Fields The following are the only text fields in general use in the scripts; @@ -1134,7 +1151,7 @@ sub read_config{ return; } # first, figure out what type of file we're reading in. - my $fh = new IO::File $conf_file,'r' + my $fh = IO::File->new($conf_file,'r') or die "Unable to open configuration file $conf_file for reading: $!"; # A new version configuration file must have a comment as its first line my $first_line = <$fh>;