cpan/Math-BigInt/t/inf_nan.t Special tests for inf and *NaN* handling
cpan/Math-BigInt/t/isa.t Test for Math::BigInt inheritance
cpan/Math-BigInt/t/lib_load.t Test sane lib names
+cpan/Math-BigInt/t/Math/BigFloat/#Subclass.pm#
cpan/Math-BigInt/t/Math/BigFloat/Subclass.pm Empty subclass of BigFloat for test
cpan/Math-BigInt/t/Math/BigInt/BareCalc.pm Bigint's simulation of Calc
cpan/Math-BigInt/t/Math/BigInt/Lib/Minimal.pm
},
'Math::BigInt' => {
- 'DISTRIBUTION' => 'PJACKLAM/Math-BigInt-1.999802.tar.gz',
+ 'DISTRIBUTION' => 'PJACKLAM/Math-BigInt-1.999803.tar.gz',
'FILES' => q[cpan/Math-BigInt],
'EXCLUDED' => [
- qr{^inc/},
qr{^examples/},
qr{^t/author-},
qw( t/00sig.t
use Carp ();
use Math::BigInt ();
-our $VERSION = '1.999802';
-$VERSION = eval $VERSION;
+our $VERSION = '1.999803';
require Exporter;
our @ISA = qw/Math::BigInt/;
use Carp ();
-our $VERSION = '1.999802';
-$VERSION = eval $VERSION;
+our $VERSION = '1.999803';
our @ISA = qw(Exporter);
our @EXPORT_OK = qw(objectify bgcd blcm);
use Carp;
use Math::BigInt::Lib;
-our $VERSION = '1.999802';
-$VERSION = eval $VERSION;
+our $VERSION = '1.999803';
our @ISA = ('Math::BigInt::Lib');
use strict;
use warnings;
-our $VERSION = '1.999802';
-$VERSION = eval $VERSION;
+our $VERSION = '1.999803';
package Math::BigInt;
use strict;
use warnings;
-our $VERSION = '1.999802';
-$VERSION = eval $VERSION;
+our $VERSION = '1.999803';
use Carp;
--- /dev/null
+#!perl
+
+# for testing subclassing Math::BigFloat
+
+package Math::BigFloat::Subclass;
+
+require 5.006;
+
+use strict;
+use warnings;
+
+use Exporter;
+use Math::BigFloat 1.38;
+
+our ($accuracy, $precision, $round_mode, $div_scale);
+
+our @ISA = qw(Exporter Math::BigFloat);
+
+our $VERSION = "0.06";
+
+use overload; # inherit overload from BigInt
+
+# Globals
+$accuracy = $precision = undef;
+$round_mode = 'even';
+$div_scale = 40;
+
+sub new {
+ my $proto = shift;
+ my $class = ref($proto) || $proto;
+
+ my $value = shift;
+ my $a = $accuracy; $a = $_[0] if defined $_[0];
+ my $p = $precision; $p = $_[1] if defined $_[1];
+ # Store the floating point value
+ my $self = Math::BigFloat->new($value, $a, $p, $round_mode);
+ bless $self, $class;
+ $self->{'_custom'} = 1; # make sure this never goes away
+ return $self;
+}
+
+BEGIN {
+ *objectify = \&Math::BigInt::objectify;
+ # to allow Math::BigFloat::Subclass::bgcd( ... ) style calls
+ *bgcd = \&Math::BigFloat::bgcd;
+ *blcm = \&Math::BigFloat::blcm;
+}
+
+1;
use strict;
use warnings;
-our $VERSION = '1.999801';
+our $VERSION = '1.999803';
# Package to to test Bigint's simulation of Calc
use warnings;
use lib 't';
-my $VERSION = '1.999800'; # adjust manually to match latest release
-$VERSION = eval $VERSION;
+my $VERSION = '1.999803'; # adjust manually to match latest release
use Test::More tests => 5;