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