ADD: more tests
This commit is contained in:
parent
d7fb6dc7a4
commit
aee624bbc0
@ -29,7 +29,6 @@ sub init {
|
||||
$self->createQuery();
|
||||
|
||||
$self->createDSN();
|
||||
$self->tryToConnect();
|
||||
}
|
||||
|
||||
sub createDSN
|
||||
@ -85,27 +84,6 @@ sub createQuery
|
||||
$self->log(LOGDEBUG, "created query " . $self->{sqlquery});
|
||||
}
|
||||
|
||||
sub tryToConnect
|
||||
{
|
||||
my $self = shift;
|
||||
|
||||
my $dsn = $self->{dsn};
|
||||
my $user = $self->{user};
|
||||
my $pass = $self->{pass};
|
||||
|
||||
$self->log(LOGDEBUG, "DSN try:" . $dsn);
|
||||
|
||||
my $dbh = DBI->connect($dsn, $user , $pass );
|
||||
|
||||
if ($dbh->err())
|
||||
{
|
||||
$self->log(LOGERROR, "error connecting to DB: " . $dbh->errstr());
|
||||
return DECLINED;
|
||||
}
|
||||
|
||||
$dbh->disconnect;
|
||||
}
|
||||
|
||||
sub prepareParams
|
||||
{
|
||||
my $self = shift;
|
||||
|
Loading…
Reference in New Issue
Block a user