Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I don't do IRC, so I'm asking here instead. Besides, I gather that this will be interesting information, for other people who are interested in this project.

    How do you propose we fix this?

    • Use Archive::Tar::Streamed [cpan.org]. This can be done by changing the code in CPAN.pm.

    • Don't use Archive::Tar::Streamed [cpan.org], but instead, incorporate its code into CPAN.pm. (The module code is quite short.)

    • Modify Archive::Tar [cpan.org] so it includes the functionality of Archive::Tar::Streamed [cpan.org]

    • Fix Archive::Tar [cpan.org] so it transparently includes the desired functionality: so when it extracts the files, it simply copies the bytes from the original tar archive to the new file, and they never get fully loaded into memory.

      CPAN.pm could remain unchanged if this is the default in Archive::Tar [cpan.org], which I prefer, or if the default behaviour in Archive::Tar [cpan.org] remains unchanged (for backward compatibility), simply add a new option flag in the parameters in some method call, so it avoids loading the entire archive into memory.

    I personally prefer the latter.

    • Archive::Tar itself ALREADY contains the required functionality according to Jos, in the ->iter interface.

      What's missing is that Archive::Extract isn't actually using the streaming API, it's using the in-memory API.

      So Archive::Extract needs to recognise when the Archive::Tar version is high enough to support ->iter and then preferentially use that.

      • Urm, yeah, apparently I succeeded in skipping over one of the modules: Archive::Extract [cpan.org]: I immediately forgot about it after I read your post, likely because I think I wouldn't have done it that way.

        Well, anyway, it's clear now what you expect to be done.