I was under the impression that you cannot (err, should not) upgrade Storable without upgrading Perl at the same time.. Is that not the case?..
Also, I am not sure if it is failing during a read or a write, but according to the stack trace I'd say probably more likely a write...
Here is the code for writing:
my @vals=(\@someArray,\%someHash);
my $res=store(\@vals,"$path/$name");
Here is some code for reading:
my @someArray = ();
my %someHash = ();
my $res=retrieve("$path/$name");
if($res) {
my ($tmp1, $tmp2) = @$res;
if($tmp1) {
@someArray = @$tmp1;
}
if($tmp2) {
%someHash = %$tmp2;
}
}
I started doing diff on storable.xs and am pretty sure that it must be failing inside magic_write, somewhere around this line:
WRITE(header, length);
Interestingly this was changed in 2.07 to:
WRITE( (unsigned char*) header, length);
The WRITE #define has been unchanged, even up to version 2.13:
#define WRITE(x,y) \
STMT_START { \
if (!cxt->fio) \
MBUF_WRITE(x,y); \
else if (PerlIO_write(cxt->fio, x, y) != y) \
return -1; \
} STMT_END
I'm not a C programmer so I'm not sure what relevance any of this has, could this be the source of the problem?... I can't find in the ChangeLog why that particular change was made and don't really know what it does...
Any ideas?...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.