bignum overrides.t: Fix for 5.8
authorFather Chrysostomos <sprout@cpan.org>
Thu, 4 Oct 2012 16:15:10 +0000 (09:15 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Thu, 4 Oct 2012 16:37:59 +0000 (09:37 -0700)
We use the ;$ prototype for testing global overrides under 5.8, as it
had no _ prototype.  But back then (before 5.14, in fact) ;$ did not
give a function unary precedence.

Comparing against 5.009004 in bigint scope is the same as comparing
against 5, resulting in incorrect version checks and skips being
skipped.

dist/bignum/t/overrides.t

index 581ec98..84a2ce1 100644 (file)
@@ -31,7 +31,7 @@ BEGIN
   is oct(@_), "16", 'bigint oct override provides scalar context';
   SKIP:
     {
-    skip "no lexical hex/oct", 2 unless $] > 5.009004;
+    skip "no lexical hex/oct", 2 unless $] > do { no bigint; 5.009004};
     is ref hex(1), 'Math::BigInt',
       'bigint hex() works when bignum and bigrat are loaded';
     is ref oct(1), 'Math::BigInt',
@@ -108,5 +108,5 @@ is $oct_called, 1, 'existing oct overrides are called';
   ::is \&hex, \&bigint::hex, 'bigrat exports same hex as bigint';
   ::is \&oct, \&bigint::oct, 'bigrat exports same oct as bigint';
 }
-is ref hex 0, "", 'hex export is not global';
-is ref oct 0, "", 'oct export is not global';
+is ref(hex 0), "", 'hex export is not global';
+is ref(oct 0), "", 'oct export is not global';