summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xvideoadd.pl4
-rwxr-xr-xvideodb-check.pl4
-rwxr-xr-xvideomv.pl4
-rwxr-xr-xvideorm.pl4
4 files changed, 8 insertions, 8 deletions
diff --git a/videoadd.pl b/videoadd.pl
index 5c49b61..079a4e3 100755
--- a/videoadd.pl
+++ b/videoadd.pl
@@ -233,8 +233,8 @@ my $dbh;
unless ( defined $ignoredb_flag ) {
# 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}) {
+ if (defined $config{dbi_misc}) {
+ while (my ($k,$v) = each %{$config{dbi_misc}}) {
$dsn .= ";$k=$v";
}
}
diff --git a/videodb-check.pl b/videodb-check.pl
index 14d58ed..1e5691b 100755
--- a/videodb-check.pl
+++ b/videodb-check.pl
@@ -135,8 +135,8 @@ 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}) {
+if (defined $config{dbi_misc}) {
+ while (my ($k,$v) = each %{$config{dbi_misc}}) {
$dsn .= ";$k=$v";
}
}
diff --git a/videomv.pl b/videomv.pl
index d7d4655..2448855 100755
--- a/videomv.pl
+++ b/videomv.pl
@@ -380,8 +380,8 @@ my @real_directors = splitdir($real_directors);
my ($dsn, $dbh, $RES, $nRES, $id);
unless (defined $ignoredb_flag) {
$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}) {
+ if (defined $config{dbi_misc}) {
+ while (my ($k,$v) = each %{$config{dbi_misc}}) {
$dsn .= ";$k=$v";
}
}
diff --git a/videorm.pl b/videorm.pl
index af33032..659f718 100755
--- a/videorm.pl
+++ b/videorm.pl
@@ -162,8 +162,8 @@ if (-l $file_s) {
# 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}) {
+if (defined $config{dbi_misc}) {
+ while (my ($k,$v) = each %{$config{dbi_misc}}) {
$dsn .= ";$k=$v";
}
}