in reply to storable error

I'd settle for someone just explaining what the error means in English.

The error means that when you are trying to thaw your data, the version of of Storable you are using is v2.5, but it detects a v2.6 signature embedded in the data.

Because the version of Storable you are using is backlevel from the version used to freeze the data, the module aborts as it is possible that the internal format may have change between v2.5 and v2.6 and that change might mean that it will not correctly process the data, but may not be able to detect the change.

The answer woudl appear to be to upgrade the version of Storable on the machine you are trying to thaw the data to v2.6 or later.

The current CPAN version is v2.13, and this should be able to decode v2.6 data correctly.

Alternatively, CPAN also carries several (10+) generation of earlier versions. v2.6 is available here.

However, if you are running the freeze() code and thaw() code on the same setup, it seems likely that something is broken with your installation. In which case, you would probably be best to expunge all races of Storable from your system not forgetting those bits located under ../lib/auto/Storable/*/*, and then install the latest version from CPAN.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"Think for yourself!" - Abigail
"Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon

Replies are listed 'Best First'.
Re^2: storable error
by CassJ (Sexton) on Oct 17, 2004 at 23:09 UTC
    thanks. Guess it must be the installation as I'm freezing and thawing on the same setup. Don't have access to the main perl library to update the version of storable in there, so I tried installing it locally and use lib'ing that. Still getting the same error. Does this mean my local version of the module isn't being used (and if so, is there a way of forcing the script to use this version?) or does it mean there's something else wrong?

    Cheers,
    Cxx

      Try running the following snippet of code having modified the use lib ...; statement to match that you are using in your program.

      #! perl -slw no warnings; use lib 'whatever you are using'; use Storable; for ( sort keys %INC ) { printf "%20s => %s ", $_, $INC{ $_ }; s[/][::]g; s[.pm][]; print eval "\$$_\::VERSION"; }

      The output should look something like that below and will allow you to identify where the version of Storable is being picked up from and which version it is.

      P:\test>used AutoLoader.pm => c:/Perl/lib/AutoLoader.pm 5.60 Carp.pm => c:/Perl/lib/Carp.pm 1.02 Config.pm => c:/Perl/lib/Config.pm DynaLoader.pm => c:/Perl/lib/DynaLoader.pm 1.05 Exporter.pm => c:/Perl/lib/Exporter.pm 5.58 Exporter/Heavy.pm => c:/Perl/lib/Exporter/Heavy.pm 5.58 Fcntl.pm => c:/Perl/lib/Fcntl.pm 1.05 Storable.pm => c:/Perl/lib/Storable.pm 2.12 XSLoader.pm => c:/Perl/lib/XSLoader.pm 0.02 c:/Perl/lib/auto/Storable/autosplit.ix => c:/Perl/lib/auto/Storable/au +tosplit.ix strict.pm => c:/Perl/lib/strict.pm 1.03 vars.pm => c:/Perl/lib/vars.pm 1.01 warnings.pm => c:/Perl/lib/warnings.pm 1.03 warnings/register.pm => c:/Perl/lib/warnings/register.pm 1.00

      Did you create the frozen data and then upgrade Storable? Because if not, something is seriously wrong with your install.


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "Think for yourself!" - Abigail
      "Memory, processor, disk in that order on the hardware side. Algorithm, algorithm, algorithm on the code side." - tachyon
        Still seems to be using the version that isn't in my local library. But even though it claims to install OK locally, I can't find any record of it in my library, so I have no idea what's going on. Will get one of the computer guys at work to have a look tomorrow - is getting a bit late to try and sort it now.

        Thanks for all your help. I'll let you know if I get it fixed.

        Cxx No clue what the problem was, but reinstalling fixed it. Thanks!