tinita has asked for the wisdom of the Perl Monks concerning the following question:

hi monks,

my provider recently changed the system to
Linux vm37.bln2.vrmd.de 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 17:57:31 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux
(I don't know what it was before, I believe it was not 64bit)

the perl-version changed from 5.8.0 to 5.8.5.
now Storable throws this errormessage:
Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 328, at -e line 3

yes, I already tried setting $Storable::interwork_56_64bit:

perl -wle' use Storable; use Data::Dumper; $Storable::interwork_56_64bit = 1; my $h = retrieve "file.dat"; print Dumper $h ' Name "Storable::interwork_56_64bit" used only once: possible typo at - +e line 2. Byte order is not compatible at ../../lib/Storable.pm (autosplit into +../../lib/auto/Storable/_retrieve.al) line 328, at -e line 3

so what could I do to get my data back?

update: it works if I copy the files to my notebook, dump it and use this dump for storing it again with Storable. should have been obvious... it's just the 64bit-thing, not the perl-version change. I only wonder why $Storable::interwork_56_64bit doesn't work

Replies are listed 'Best First'.
Re: Storable.pm: Byte order is not compatible
by GrandFather (Saint) on Sep 03, 2006 at 05:42 UTC

    I presume you had existing data that was causing trouble when you tried to load it. Storable's various compatibility modes work by writing stuff in an appropriate format that allows it to be reloaded as required. However if default options are used storable doesn't write the information it requires to retrieve the data correctly when it is loaded again on an incompatible system.


    DWIM is Perl's answer to Gödel
      However if default options are used ...

      Could you elaborate? I can find an ominous mention "This is a design failure." under 64_bit_data_in_perl_5.6.0_and_5.6.1 in the Storable docs, but that section also mentions the global that tinita said didn't help. Or are you restating what that section said?