From 2764618fb5825840466e6f003ec6df5e8ccdfe5e Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Fri, 17 Feb 2012 21:11:35 +0100 Subject: support of extra connections options (eg, ssl) --- videodb-check.pl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'videodb-check.pl') diff --git a/videodb-check.pl b/videodb-check.pl index 8acff46..11c5de2 100755 --- a/videodb-check.pl +++ b/videodb-check.pl @@ -134,6 +134,11 @@ if (@ARGV) { # Connect to database my $dsn = "DBI:$config{driver}:database=$config{database};host=$config{hostname};port=$config{port}"; +if (exists $config{dbi_misc}) { + while (my ($k,$v) = each $config{dbi_misc}) { + $dsn .= ";$k=$v"; + } +} my $dbh = DBI->connect($dsn, $config{user}, $config{password}) or die "Can't connect do database\n"; $dbh->do( "set names utf8" ) or die; -- cgit v1.2.3