Fail on Perls without unpack Q
authorMarius Gavrilescu <marius@ieval.ro>
Sat, 9 Dec 2017 15:53:49 +0000 (17:53 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sat, 9 Dec 2017 15:53:49 +0000 (17:53 +0200)
Makefile.PL

index 2c380c020ec061e96309ef1dfa9852180df9fc85..e336e8e68bfcfefb258314137618acfc6d94c447 100644 (file)
@@ -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',
This page took 0.010659 seconds and 4 git commands to generate.