I need of course support for all tar command line options.

Well, if you really mean all the options, you won't actually find this part in the Archive::Tar module -- the whole option set is only available in the command-line version of tar). Of course, the range of options varies slightly depending on which version of command-line tar you're talking about (GNU tar's option set is a good and at least as broad as the versions that come "standard" on non-linux versions of unix, but is also somewhat different from all of them).

You'll see from the Arcihve::Tar man page that it provides methods that will cover the create, append, replace, list (tabulate), and extract functions, as well as (un)compression. The listing of files is flexible (you get to choose what file properties to list) and extraction can be to a scalar variable or to a file.

Everything else about command-line tar -- files to include or exclude from an operation (specified by path, date or whatever), recursion through a directory tree to create a tar set, comparing file dates to decide whether the tarred file is newer or older than a corresponding disk file, and so on -- is stuff you will need to do on your own, probably using other modules, like File::Find.

If you want all the command-line option functionality, why not just use the basic command-line tool -- it has been ported to windows, and is natively available for unix/linux and now even macs (via OSX). Use perl scripting as a wrapper for it, in case that makes tool easier for you to use.

Archive::Tar is a totally cool module that enables a lot of stuff that would be awkward or impossible using just the tar command, but replicating all the options functionality of tar (given that tar already provides that) seems unnecessary.


In reply to Re: Tar question by graff
in thread Tar question by hotshot

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.