Subject: | Please consider providing STORABLE_freeze and STORABLE_thaw hooks to support thaw(nfreeze(int64())) |
Currently, the following code doesn't work:
perl -MStorable=thaw,nfreeze -MMath::Int64=int64 -e 'print
thaw(nfreeze(int64(q(8491019990008))))'
My understanding is that this is because merely blessing a scalar into
Math::Int64 isn't enough; the SV needs to be modified as well, so 0 is
returned instead of the expected value. I believe you could do this by
using STORABLE_freeze and STORABLE_thaw. Alternatively, detecting that
the stored SV is a string instead of the expected int64 might also work.
[But I'm not expert enough in the internals to know that that will
definitely work.]