chiark / gitweb /
Remove automatic upgrade of numerical types
[nailing-cargo.git] / README.pod
index 0f68f58a0d64bbc3237912ba9131d7f715ef8475..66ee8b1e0d334c9b6e7356f22c498fc097cb538f 100644 (file)
@@ -8,7 +8,7 @@ TOML::Tiny - a minimal, pure perl TOML parser and serializer
 
 =head1 VERSION
 
-version 0.02
+version 0.03
 
 =head1 SYNOPSIS
 
@@ -131,6 +131,32 @@ If you wish to override this, you can provide your own routine to generate value
     },
   );
 
+=item inflate_integer
+
+TOML integers are 64 bit and may not match the size of the compiled perl's
+internal integer type. By default, integers are left as-is as perl strings
+which may be upgraded as needed by the caller.
+
+  my $parser = TOML::Tiny->new(
+    inflate_integer => sub{
+      use bignum;
+      return 0 + shift;
+    }
+  );
+
+=item inflate_float
+
+TOML floats are 64 bit and may not match the size of the compiled perl's
+internal float type. By default, integers are left as-is as perl strings which
+may be upgraded as needed by the caller.
+
+  my $parser = TOML::Tiny->new(
+    inflate_float => sub{
+      use bignum;
+      return 0 + shift;
+    }
+  );
+
 =item strict_arrays
 
 C<TOML v5> specified homogenous arrays. This has since been removed and will no