Frozen

 view release on metacpan or  search on metacpan

lib/Frozen.pm  view on Meta::CPAN

C<DBL_MAX>, which is stored as an infinity, and a non-zero one under the
smallest denormal, which is stored as a zero.

A block holds an IEEE double. On a perl built C<-Duselongdouble> or
C<-Dusequadmath> the NV is wider than that, so storing one rounds to the
nearest double, and C<0.1> is kept to a double's precision rather than the
NV's. That is the format, not an error, and it is not what C<lossy_nv>
governs: refusing it would refuse C<0.1> outright on those perls. What is
refused without the flag is a narrowing that destroys the value rather than
its tail - a finite NV that would come back as an infinity, a non-zero one
that would come back as zero. An NV that is already infinite, and a NaN, are
stored as they are.

C<< stringify => 1 >> stores every defined non-reference scalar as its string
form, so C<5> is kept as C<"5"> and a string read answers for it. It is for a
reader that returns text and has no use for the difference between a number
and its digits - a translation catalogue, a table of labels - which would
otherwise have to walk its own data and stringify it first. C<undef> is
untouched, so a reader that refuses null can still see it.

Neither is exported. L<Storable> exports C<freeze> and C<thaw>, and a program



( run in 2.425 seconds using v1.01-cache-2.11-cpan-60884a8df76 )