3 package Math::BigFloat::Subclass;
9 use Math::BigFloat(1.23);
10 use vars qw($VERSION @ISA $PACKAGE
11 $accuracy $precision $round_mode $div_scale);
13 @ISA = qw(Exporter Math::BigFloat);
18 $accuracy = $precision = undef;
25 my $class = ref($proto) || $proto;
28 # Set to 0 if not provided, but don't use || (this would trigger for
29 # a passed objects to see if they are zero)
30 $value = 0 if !defined $value;
32 # Store the floating point value
33 my $self = bless Math::BigFloat->new($value), $class;
34 $self->{'_custom'} = 1; # make sure this never goes away