From f7bf9aa61c1462ab681607cdf291d95a2e44fbf5 Mon Sep 17 00:00:00 2001 From: Charles McGarvey Date: Wed, 11 May 2022 16:49:45 -0600 Subject: [PATCH] Prereq Math::BigInt 1.993 to fix broken tests --- Changes | 3 ++- lib/File/KDBX/Util.pm | 1 + t/util.t | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 76956a5..65781fc 100644 --- a/Changes +++ b/Changes @@ -2,7 +2,8 @@ Revision history for File-KDBX. {{$NEXT}} - * Fix parsing KDBX4 datetimes on 32-bit perls. + * Fixed parsing KDBX4 datetimes on 32-bit perls. + * Fixed broken bigint tests on perls < 5.14. 0.902 2022-05-03 19:18:06-0600 diff --git a/lib/File/KDBX/Util.pm b/lib/File/KDBX/Util.pm index b8c901b..d272632 100644 --- a/lib/File/KDBX/Util.pm +++ b/lib/File/KDBX/Util.pm @@ -600,6 +600,7 @@ sub pack_Ql { require Config; if ($Config::Config{ivsize} < 8) { if (blessed $num && $num->can('as_hex')) { + require Math::BigInt; return "\xff\xff\xff\xff\xff\xff\xff\xff" if Math::BigInt->new('18446744073709551615') <= $num; return "\x00\x00\x00\x00\x00\x00\x00\x80" if $num <= Math::BigInt->new('-9223372036854775808'); my $neg; diff --git a/t/util.t b/t/util.t index a785b2f..45fbbe2 100644 --- a/t/util.t +++ b/t/util.t @@ -7,7 +7,7 @@ use lib 't/lib'; use TestCommon; use File::KDBX::Util qw(:all); -use Math::BigInt; +use Math::BigInt 1.993; use Scalar::Util qw(blessed); use Test::More; -- 2.43.0