=item debbugs_db
-Name of debbugs PostgreSQL database service
+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
our $VERSION=2;
# You can replace this text with custom code or comments, and it will be preserved on regeneration
+
+# override connect to handle just passing a bare service
+sub connect {
+ my ($self,@rem) = @_;
+ if ($rem[0] !~ /:/) {
+ $rem[0] = 'dbi:Pg:service='.$rem[0];
+ }
+ $self->clone->connection(@rem);
+}
+
1;
my ($options) = @_;
# connect to the database; figure out how to handle errors
# properly here.
- my $s = Debbugs::DB->connect('dbi:Pg:service='.$options->{service}) or
+ my $s = Debbugs::DB->connect($options->{service}) or
die "Unable to connect to database: ";
}