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 - mneylon-pm@masemware.com
||
"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
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.