3 package Math::BigInt::Subclass;
9 use Math::BigInt(1.49);
10 use vars qw($VERSION @ISA $PACKAGE @EXPORT_OK
11 $accuracy $precision $round_mode $div_scale);
13 @ISA = qw(Exporter Math::BigInt);
14 @EXPORT_OK = qw(bgcd);
18 use overload; # inherit overload from BigInt
21 $accuracy = $precision = undef;
28 my $class = ref($proto) || $proto;
31 my $a = $accuracy; $a = $_[0] if defined $_[0];
32 my $p = $precision; $p = $_[1] if defined $_[1];
33 my $self = Math::BigInt->new($value,$a,$p,$round_mode);
35 $self->{'_custom'} = 1; # make sure this never goes away
41 Math::BigInt::bgcd(@_);
46 Math::BigInt::blcm(@_);
52 $self->SUPER::import(@_); # need it for subclasses
53 #$self->export_to_level(1,$self,@_); # need this ?