ttps://metacpan.org/pod/Object::GMP>
=cut
use Moo::Role;
use Math::BigInt lib => 'GMP';
require JSON::XS;
my %GMP_FIELDS = ();
sub BUILDARGS_val2gmp {
my ($class, @fields) = @_;
map { $GM
$hash{$key} = $val;
}
}
return \%hash;
}
sub to_json {
my ($self, %options) = @_;
return JSON::XS->new->pretty->encode($self->hashref(%options));
}
sub _debug {
ions) = @_;
return if !$ENV{DEBUG};
return if $ENV{ONLY_SHOW} && $pre_note !~/$ENV{ONLY_SHOW}/;
print "$pre_note: " if $pre_note;
print $self->to_json(%options);
print "\n";
}
1;