use Archive::Tar;
$tar = Archive::Tar->new();
$tar->read("origin.tar.gz",1);
$tar->add_files("file/foo.c", "file/bar.c");
$tar->add_data("file/baz.c","This is the file contents");
$tar->write("files.tar");
At the moment these methods are implemented:
$filename and content $data. Specific options can be set using $opthashref, which will be documented later.
eq.
$tar!
@filenames to disk, creating subdirectories as neccesary. This might not work too well
under VMS and MacOS.
$content be the content for the file named
$file.
Fixed two bugs with symlink handling, reported in excellent detail by an admin at teleport.com called Chris.
Primive tar program (called ptar) included with distribution. Useage should be pretty obvious if you've used a normal tar program.
Added methods get_content and replace_content.
Added support for paths longer than 100 characters, according to POSIX. This is compatible with just about everything except GNU tar. Way to go, GNU tar (use a better tar, or GNU cpio).
NOTE: When adding files to an archive, files with basenames longer than 100 characters will be silently ignored. If the prefix part of a path is longer than 155 characters, only the last 155 characters will be stored.
list_files() method, as requested by Michael Wiedman.
Fixed a couple of dysfunctions when run under Windows NT. Michael Wiedmann reported the bugs.
Changed the documentation to reflect reality a bit better.
Fixed bug in format_tar_entry. Bug reported by Michael Schilli.
use strict; stop complaining under perl version 5.003.
Ties to Compress put in. Will warn if it isn't available.
$tar->write() with no argument now returns the formatted archive.
Protected the calls to readlink() and symlink().
AFAIK this module should now run just fine on Windows NT.
Add method to write a single entry to disk (extract)
Added method to add entries entirely from scratch (add_data)
Changed name of add() to add_file()
All calls to croak() removed and replaced with returning undef
and setting Tar::error.
Better handling of tarfiles with garbage at the end.