OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-registry Date: 02-Aug-2006 23:37:15
Branch: HEAD Handle: 2006080222371400
Modified files:
openpkg-registry registry-ui.pl
Log:
improve code readability
Summary:
Revision Changes Path
1.87 +7 -4 openpkg-registry/registry-ui.pl
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-registry/registry-ui.pl
============================================================================
$ cvs diff -u -r1.86 -r1.87 registry-ui.pl
--- openpkg-registry/registry-ui.pl 2 Aug 2006 21:33:24 -0000 1.86
+++ openpkg-registry/registry-ui.pl 2 Aug 2006 21:37:14 -0000 1.87
@@ -245,10 +245,12 @@
$dbi = undef;
if ($db eq "registry") {
+ my $tablespace = $cfg->{db}->{registry}->{tablespace};
+ my $host = $cfg->{db}->{registry}->{host};
+ my $username = $cfg->{db}->{registry}->{username};
+ my $password = $cfg->{db}->{registry}->{password};
$dbi = DBI->connect (
-
"DBI:Pg:dbname=".$cfg->{db}->{registry}->{tablespace}.";host=".$cfg->{db}->{registry}->{host},
- $cfg->{db}->{$db}->{username},
- $cfg->{db}->{$db}->{password},
+ "DBI:Pg:dbname=$tablespace;host=$host", $username, $password,
{
PrintError => 0,
PrintWarn => 0,
@@ -258,8 +260,9 @@
);
}
elsif ($db eq "session") {
+ my $dbfile = $cfg->{db}->{session}->{dbfile};
$dbi = DBI->connect (
- "DBI:SQLite:dbname=".$cfg->{db}->{session}->{dbfile}, "", "",
+ "DBI:SQLite:dbname=$dbfile", "", "",
{
PrintError => 0,
PrintWarn => 0,
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]