]> git.donarmstrong.com Git - debbugs.git/blobdiff - Debbugs/Config.pm
switch to compatibility level 12
[debbugs.git] / Debbugs / Config.pm
index a02072c65b78565895712f8d09ad554a9635f929..0d0abae37ff6c489f80cd4b7a413f11ba279e92c 100644 (file)
@@ -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>;