From 91b2b1e7c7f1462976c73d9b0df49883a8c24bac Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 26 Feb 2020 02:31:08 -0800 Subject: [PATCH] MessageHistory_SQLite: move extension loading to inside eval block --- PBot/MessageHistory_SQLite.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PBot/MessageHistory_SQLite.pm b/PBot/MessageHistory_SQLite.pm index ab2837d4..1a9c79c2 100644 --- a/PBot/MessageHistory_SQLite.pm +++ b/PBot/MessageHistory_SQLite.pm @@ -63,10 +63,10 @@ sub begin { $self->{dbh} = DBI->connect("dbi:SQLite:dbname=$self->{filename}", "", "", {RaiseError => 1, PrintError => 0, AutoInactiveDestroy => 1, sqlite_unicode => 1}) 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 { + $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'); use PBot::SQLiteLoggerLayer; use PBot::SQLiteLogger;