in reply to verifying serialized objects
Storable's man page promises that it checks for I/O errors. I just checked this by creating a small RAM disk and running the following script:
Sure enough, this displayed "Result:1" unless the RAM disk filled up, in which cases it displayed "Result:(undef)". (As an aside, the man page says store will die on "serious" errors, but I wasn't able to induce this even by forcibly unmounting the filesystem in mid-write... whatever these serious errors are, I hope I never see one! :)#!/usr/bin/perl use Storable; my @huge = ('aaaaa' .. 'azaaa'); my $result = undef; eval { $result = store \@huge, '/mnt/mfs/bigfile' }; $result = '(undef)' unless defined $result; print "Result:$result exception:$@\n";
If you are really paranoid (or running NFS with UDP checksums disabled), you could always try thawing your data back into a second variable and then either doing your own deep comparison or letting Storable do it for you (look for the $Storable::canonical option in the Storable man page).
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: verifying serialized objects
by dshahin (Pilgrim) on Dec 28, 2000 at 01:25 UTC |