chiark
/
gitweb
/
~ianmdlvl
/
nailing-cargo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3de24b0
)
Support for bigint/bignum in toml output
author
Jeff Ober
<jober@ziprecruiter.com>
Thu, 9 Jan 2020 18:32:23 +0000
(13:32 -0500)
committer
Jeff Ober
<jober@ziprecruiter.com>
Thu, 9 Jan 2020 18:32:23 +0000
(13:32 -0500)
lib/TOML/Tiny/Writer.pm
patch
|
blob
|
history
diff --git
a/lib/TOML/Tiny/Writer.pm
b/lib/TOML/Tiny/Writer.pm
index 11e2bb333c043c4fd98d603dffc1ff2eeb39b406..6a840dda157551ddb598e4203ba909ce5ace04db 100644
(file)
--- a/
lib/TOML/Tiny/Writer.pm
+++ b/
lib/TOML/Tiny/Writer.pm
@@
-102,6
+102,14
@@
sub to_toml {
}
}
+ when ('Math::BigInt') {
+ return $data->bstr;
+ }
+
+ when ('Math::BigFloat') {
+ return $data->bstr;
+ }
+
when (defined) {
die 'unhandled: '.Dumper($_);
}