From 29d65ef5696fb186409f1e1ca812013b131112d5 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Sat, 9 Dec 2017 17:53:49 +0200 Subject: [PATCH] Fail on Perls without unpack Q --- Makefile.PL | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile.PL b/Makefile.PL index 2c380c0..e336e8e 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,6 +1,10 @@ use 5.014000; use ExtUtils::MakeMaker; +my $packed_nr = "\x00\x00\x00\x00\x00\xBC\x61\x4E"; +my $unpacked_nr = eval { unpack 'Q>', $packed_nr }; +$unpacked_nr == 12345678 || die "Failed to unpack quad, this Perl does not support 64-bit integers. Bailing out. Error '$!'\n"; + WriteMakefile( NAME => 'Slob', VERSION_FROM => 'lib/Slob.pm', -- 2.39.2