I tried to do a quicky-but-useful project this weekend in the form of Tie::Hash::Tar, a way to access tar file contents via the hash mechanism. In this situation, I'm using the object version of the Archive::Tar, as opposed to the class methods. I found that generally there were no problems with this, until I tried to open an existing tar file (w or w/o compression) and add new files to it. I found that after new() and read() calls on the object, the object would be aware of all data files in the archive, but would have those contents set as undef by default. Unless these were modified, then on write(), those files with undef contents would NOT be written into the new tar file. Now, the way I read the docs (and only have done a cursory glance at the code at this point), I would believe that the Archive::Tar module only grabs file content when needed as to cut down memory usage. Either I misread this, and A:T is supposed to bring in all the content to start (which it isn't), or I'm correct, and A:T is mistakening omitting those entries that haven't been modified but haven't been read in yet. In either case, I've found that forcing a get_content() on every file in the archive fixes this case, but this is certainly not memory_friendly.
For note, this is with p5.6.1, on a Linux i386 box, with the latest version of A:T and support modules from CPAN.
I'm going to try to code dive at some point to try to find what's supposed to happen, but before I do, I wonder if anyone else has seen this problem with A:T. The ngs are suprisingly quiet on this. In addition, even I do find a problem, and a way to fix it, both discussion here and on
ngs suggest that A:T is no longer supported by it's author. How would I go able getting it patched or the like (assuming that contacting the author doesn't help?)
Dr. Michael K. Neylon - firstname.lastname@example.org
"You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important