mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-25 13:29:29 +01:00
Bump minimum Perl version to 5.20 for signatures feature
This commit is contained in:
parent
3180d11303
commit
afd07bcd57
2
cpanfile
2
cpanfile
@ -7,7 +7,7 @@
|
||||
# Install a fully featured PBot (without Windows compiler-vm support):
|
||||
# cpanm -n --installdeps . --with-all-features --without-feature compiler_vm_win32
|
||||
|
||||
requires 'perl' => '5.010001';
|
||||
requires 'perl' => '5.020000';
|
||||
|
||||
# PBot core
|
||||
requires 'Cache::FileCache';
|
||||
|
@ -19,13 +19,16 @@ sub import {
|
||||
warnings->import::into($target);
|
||||
|
||||
# use feature ':5.16'
|
||||
feature->import::into($target, ':5.16');
|
||||
feature->import::into($target, ':5.20');
|
||||
|
||||
# use utf8
|
||||
utf8->import::into($target);
|
||||
|
||||
# no if $] >= 5.018, warnings => 'experimental';
|
||||
warnings->unimport::out_of($target, 'experimental') if $] >= 5.018
|
||||
# use signatures
|
||||
feature->import::into($target, 'signatures');
|
||||
|
||||
# no warnings => 'experimental';
|
||||
warnings->unimport::out_of($target, 'experimental');
|
||||
}
|
||||
|
||||
sub unimport {
|
||||
|
@ -127,7 +127,6 @@ sub get_random_quotegrab($self, $nick, $channel, $text) {
|
||||
push @params, '%' . $text . '%';
|
||||
$joiner = ' AND';
|
||||
}
|
||||
$self->{pbot}->{logger}->log("$sql $joiner id NOT IN Seen ORDER BY RANDOM() LIMIT 1\n");
|
||||
# search for a random unseen quotegrab
|
||||
my $sth = $self->{dbh}->prepare("$sql $joiner id NOT IN Seen ORDER BY RANDOM() LIMIT 1");
|
||||
$sth->execute(@params);
|
||||
@ -162,7 +161,7 @@ sub remove_seen($self, $sql, $params) {
|
||||
$sql =~ s/^SELECT \*/SELECT id/;
|
||||
|
||||
my $count = eval {
|
||||
my $sth = $self->{dbh}->prepare("DELETE from Seen WHERE id IN ($sql)");
|
||||
my $sth = $self->{dbh}->prepare("DELETE FROM Seen WHERE id IN ($sql)");
|
||||
$sth->execute(@$params);
|
||||
return $sth->rows;
|
||||
};
|
||||
|
@ -25,7 +25,7 @@ use PBot::Imports;
|
||||
# These are set by the /misc/update_version script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 4644,
|
||||
BUILD_REVISION => 4645,
|
||||
BUILD_DATE => "2023-04-13",
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user