in reply to Re^4: Storable- long integer size
in thread Storable- long integer size
Then I copied (via scp) the generated 'store.ubu' over to a Windows box. (The file does not get changed by the transfer.) Using a compatible Windows perl (ivsize of 8 and byteorder of 12345678) I ran this script to retrieve the value:use strict; use warnings; use Storable; my $val = 12345678; my $file = 'store.ubu'; store (\$val, $file); my $valref = retrieve($file); print "$val $$valref\n";
It output:use strict; use warnings; use Storable; my $file = 'store.ubu'; print "Retrieving $file\n"; my $r = retrieve($file); print $$r, "\n";
I then went into the Storable-2.51 source and changed line 6037 of Storable.xs from:Retrieving store.ubu Long integer size is not compatible at C:/_64/perl522_492/lib/Storable +.pm line 383, at retrieve.pl line 9.
(That's the condition that terminates the script and emits the "Long integer size is not compatible" error message.)if ((int) *current++ != sizeof(long)) to if ((int) *current++ != sizeof(IV))
Storable is actively disabling retrieval when it's not necessary to do that.Retrieving store.ubu 12345678
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Storable- long integer size
by BrowserUk (Patriarch) on Oct 22, 2015 at 06:35 UTC | |
by syphilis (Archbishop) on Oct 22, 2015 at 10:47 UTC | |
by BrowserUk (Patriarch) on Oct 22, 2015 at 11:17 UTC | |
by syphilis (Archbishop) on Oct 22, 2015 at 13:21 UTC | |
by BrowserUk (Patriarch) on Oct 23, 2015 at 09:48 UTC |