Changeset 25 for trunk/dnsbl/DNSBL.pm
- Timestamp:
- 09/03/10 15:18:51 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dnsbl/DNSBL.pm
r24 r25 100 100 sub DESTROY { 101 101 my $self = shift; 102 $self->dbclose() ;102 $self->dbclose() if $dbh; 103 103 } 104 104 … … 112 112 113 113 sub connect { 114 my $DSN = "DBI:Pg:host=dbhost;dbname=dnsbl"; 115 # my $DSN = "DBI:Pg:dbname=dnsbl"; 116 my $user = "dnsbl"; 117 my $pass = "spambgone"; 114 my $self = shift; 115 my $dbhost = shift; 116 my $dbname = shift; 117 my $dbuser = shift; 118 my $dbpass = shift; 118 119 ## want to NOT autocommit everything, it's unlikely we'll step on our own toes but... 119 $dbh = DBI->connect( $DSN, $user, $pass, {120 $dbh = DBI->connect("DBI:Pg:host=$dbhost;dbname=$dbname", $dbuser, $dbpass, { 120 121 AutoCommit => 0, 121 122 PrintError => 1
Note:
See TracChangeset
for help on using the changeset viewer.