develooper Front page | perl.perl5.porters | Postings from December 2008

Storable

Thread Next
From:
Jonathan Blaine
Date:
December 14, 2008 06:05
Subject:
Storable
Message ID:
fd6fe7cf0812121238h398200caw2e870bf1a9370172@mail.gmail.com
Hello,
I recently found Storable (2.18) and immediately had uses for it.  My
development station is running ActivePerl 5.10.0, and everything seemed to
be working fine--

until I attempted to read the file on our product servers, which are
painfully stuck at Perl 5.8.2; the highest version I found via PPM (
cpan.uwinnipeg.ca) was 2.15.

Although the documentation suggests that the older version should be able to
read the newer version (assuming new features such as restricted hashes
aren't used), whenever I attempt to do so, I receive an error indicating the
version is higher than the module--

(on version 2.18)
S:\>Test_Storable.pl S

(on version 2.15)
S:\>Test_Storable.pl L

Storable binary image v2.7 more recent than I am (v2.6) at
..\..\lib\Storable.pm (autosplit into ..\..\lib\auto\Storable\_retrieve.al)
line 323, at \\storage1\webs$\data\test_storable.pl line 9

Of course, the script works fine when loading in v2.18, even if written from
2.15

Below is the minimalized script I used to test.  I did verify that Accepting
future minor version data was true by default, and I attempted both store and
nstore functions.

Is there any way I can tell 2.18 to write to an earlier version?  Or, if
necessary, can 2.15 work on Perl 5.10?

Thanks for any help you can provide...

Jonathan Blaine



use strict;
use Storable qw(store nstore retrieve);
my
%H=(a=>"aaa",b=>"bbb",c=>"ccc",1=>{one=>1,two=>2,three=>3},2=>[1,2,3,4,5]);
if($ARGV[0] eq "S")
{   store(\%H,'test') or die "Couldn't Store! $^E" }
elsif($ARGV[0] eq "N")
{   store(\%H,'test') or die "Couldn't Store! $^E" }
else
{   my $h=retrieve('test') or die "Couln't retrieve! $^E"}

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About