Blame t/scope_f.t

Packit 7e8a16
#!perl
Packit 7e8a16
Packit 7e8a16
###############################################################################
Packit 7e8a16
# Test "no bignum;" and overloading of hex()/oct() for newer Perls
Packit 7e8a16
Packit 7e8a16
use strict;
Packit 7e8a16
use warnings;
Packit 7e8a16
Packit 7e8a16
use Test::More tests => 10;
Packit 7e8a16
Packit 7e8a16
# no :hex and :oct means these do not get overloaded for older Perls:
Packit 7e8a16
use bignum;
Packit 7e8a16
Packit 7e8a16
isnt (ref(1), '', 'is in effect');
Packit 7e8a16
isnt (ref(2.0), '', 'is in effect');
Packit 7e8a16
isnt (ref(0x20), '', 'is in effect');
Packit 7e8a16
Packit 7e8a16
SKIP: {
Packit 7e8a16
  skip ('Need at least Perl v5.9.4', 2) if $] < 5.009004;
Packit 7e8a16
Packit 7e8a16
  is (ref(hex(9)), 'Math::BigInt', 'hex is overloaded');
Packit 7e8a16
  is (ref(oct(07)), 'Math::BigInt', 'oct is overloaded');
Packit 7e8a16
  }
Packit 7e8a16
Packit 7e8a16
{
Packit 7e8a16
  no bignum;
Packit 7e8a16
Packit 7e8a16
  is (ref(1), '', 'is not in effect');
Packit 7e8a16
  is (ref(2.0), '', 'is not in effect');
Packit 7e8a16
  is (ref(0x20), '', 'is not in effect');
Packit 7e8a16
Packit 7e8a16
  isnt (ref(hex(9)), 'Math::BigInt', 'hex is not overloaded');
Packit 7e8a16
  isnt (ref(oct(07)), 'Math::BigInt', 'oct is not overloaded');
Packit 7e8a16
}