1#!perl 2 3package Math::BigInt::BareCalc; 4 5use 5.005; 6use strict; 7use warnings; 8 9require Exporter; 10 11our @ISA = qw(Exporter); 12 13our $VERSION = '0.06'; 14 15sub api_version () { 1; } 16 17# Package to to test Bigint's simulation of Calc 18 19# Uses Calc, but only features the strictly neccessary methods. 20 21use Math::BigInt::Calc '0.51'; 22 23BEGIN { 24 no strict 'refs'; 25 foreach (qw/ 26 base_len new zero one two ten copy str num add sub mul div mod inc dec 27 acmp alen len digit zeros 28 rsft lsft 29 fac pow gcd log_int sqrt root 30 is_zero is_one is_odd is_even is_one is_two is_ten check 31 as_hex as_bin as_oct from_hex from_bin from_oct 32 modpow modinv 33 and xor or 34 /) 35 { 36 my $name = "Math::BigInt::Calc::_$_"; 37 *{"Math::BigInt::BareCalc::_$_"} = \&$name; 38 } 39 print "# BareCalc using Calc v$Math::BigInt::Calc::VERSION\n"; 40} 41 42# catch and throw away 43sub import { } 44 451; 46