]> Dogcows Code - chaz/p5-File-KDBX/blobdiff - lib/File/KDBX/Loader/XML.pm
Add support for 32-bit perls
[chaz/p5-File-KDBX] / lib / File / KDBX / Loader / XML.pm
index 00676a1cf7772614520194ec83d2d508d8d099a8..1931153636d59b9626e6251934f3d38a3cc89f42 100644 (file)
@@ -9,7 +9,7 @@ use Encode qw(decode);
 use File::KDBX::Constants qw(:version :time);
 use File::KDBX::Error;
 use File::KDBX::Safe;
-use File::KDBX::Util qw(:class :text assert_64bit gunzip erase_scoped);
+use File::KDBX::Util qw(:class :int :text gunzip erase_scoped);
 use Scalar::Util qw(looks_like_number);
 use Time::Piece;
 use XML::LibXML::Reader;
@@ -533,9 +533,8 @@ sub _decode_datetime {
             throw 'Failed to parse binary datetime', text => $_, error => $err;
         }
         throw $@ if $@;
-        assert_64bit;
         $binary .= \0 x (8 - length($binary)) if length($binary) < 8;
-        my ($seconds_since_ad1) = unpack('Q<', $binary);
+        my ($seconds_since_ad1) = unpack_Ql($binary);
         my $epoch = $seconds_since_ad1 - TIME_SECONDS_AD1_TO_UNIX_EPOCH;
         return Time::Piece->new($epoch);
     }
This page took 0.025241 seconds and 4 git commands to generate.