mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-25 04:02:37 +01:00
MessageHistory_SQLite: move extension loading to inside eval block
This commit is contained in:
parent
999ee4a33c
commit
91b2b1e7c7
@ -63,10 +63,10 @@ sub begin {
|
|||||||
$self->{dbh} = DBI->connect("dbi:SQLite:dbname=$self->{filename}", "", "", {RaiseError => 1, PrintError => 0, AutoInactiveDestroy => 1, sqlite_unicode => 1})
|
$self->{dbh} = DBI->connect("dbi:SQLite:dbname=$self->{filename}", "", "", {RaiseError => 1, PrintError => 0, AutoInactiveDestroy => 1, sqlite_unicode => 1})
|
||||||
or die $DBI::errstr;
|
or die $DBI::errstr;
|
||||||
|
|
||||||
$self->{dbh}->sqlite_enable_load_extension(my $_enabled = 1);
|
|
||||||
$self->{dbh}->prepare("SELECT load_extension('/usr/lib/sqlite3/pcre.so')");
|
|
||||||
|
|
||||||
eval {
|
eval {
|
||||||
|
$self->{dbh}->sqlite_enable_load_extension(my $_enabled = 1);
|
||||||
|
$self->{dbh}->prepare("SELECT load_extension('/usr/lib/sqlite3/pcre.so')");
|
||||||
|
|
||||||
my $sqlite_debug = $self->{pbot}->{registry}->get_value('messagehistory', 'sqlite_debug');
|
my $sqlite_debug = $self->{pbot}->{registry}->get_value('messagehistory', 'sqlite_debug');
|
||||||
use PBot::SQLiteLoggerLayer;
|
use PBot::SQLiteLoggerLayer;
|
||||||
use PBot::SQLiteLogger;
|
use PBot::SQLiteLogger;
|
||||||
|
Loading…
Reference in New Issue
Block a user