|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re^4: Small Corrupted Storable Retrieve Dies With an Invalid "Out of memory!"by jbisbee (Pilgrim) |
| on Oct 27, 2004 at 21:41 UTC ( [id://403215]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
I edited the storable with... vim!!!! :P I actually did a range search and replace with vim and it worked like a charm. When looking at the file within vim, you can see hints of the data structure (scalars, arrays, and hashes). Along with running 'strings' against it, I was able to see what might be sensitive data and my intent was to censor it while keeping a storable that would reproduce the error.
The lesson I learned was that I needed to keep the string length the exact same as the orginal file (which now makes perfect sense knowing that there are read length markers before each string). Before a Storable was a kind of mystical thing that just worked, and its really strange (for me anyway) to now be able to "see" and somewhat understand the file in a hex editor. I also applied your "patch" with vim as well, I removed the 7 characters you suggested and found another 0x05 entry in the file and yanked an pasted it in place. Then I ran my test case code and the damn thing thawed :) (I've did attempt to use an hex editor on my power book with little success because I've never really used one before). Anyway, vim++ :P -biz-
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||