From 01776c9e52c63662403dcb19155ffe3bc8a035ee Mon Sep 17 00:00:00 2001 From: Mitch Jackson Date: Sun, 3 Mar 2019 19:42:10 -0500 Subject: RT# 82942 Replace DBI->connect() with FS::DBI->connect() --- torrus/perllib/Torrus/SQL.pm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'torrus/perllib') diff --git a/torrus/perllib/Torrus/SQL.pm b/torrus/perllib/Torrus/SQL.pm index de54cacee..bfd9351fb 100644 --- a/torrus/perllib/Torrus/SQL.pm +++ b/torrus/perllib/Torrus/SQL.pm @@ -124,16 +124,20 @@ sub dbh if( not defined( $dbh ) ) { - $dbh = DBI->connect( $attrs->{'dsn'}, - $attrs->{'username'}, - $attrs->{'password'}, - { 'PrintError' => 0, - 'AutoCommit' => 0 } ); + $dbh = FS::DBI->connect( + $attrs->{'dsn'}, + $attrs->{'username'}, + $attrs->{'password'}, + { + 'PrintError' => 0, + 'AutoCommit' => 0, + } + ); if( not defined( $dbh ) ) { Error('Error connecting to DBI source ' . $attrs->{'dsn'} . ': ' . - $DBI::errstr); + $FS::DBI::errstr); } else { -- cgit v1.2.1