.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Arch::Tarball 3pm" .TH Arch::Tarball 3pm "2022-06-08" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Arch::Tarball \- an interface to create and work with tarballs .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Arch::Tarball \& \& my $tarball = Arch::Tarball\->new; \& my $pipe = $tarball\->create( \& dir => \*(Aq/path/to/subdir\-to\-pack\*(Aq, \& base_name => \*(Aqnew\-subdir\-to\-pack\*(Aq, \& pipe => 1, \& ); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Arch::Tarball provides an object oriented interface to work with (create, examine or extract) standard gzipped tarballs. .PP \&\fBNote:\fR As functionality is added only when needed, a lot of features are currently not implemented. .SH "METHODS" .IX Header "METHODS" The following functions are available: .PP \&\fBnew\fR, \&\fBcreate\fR, \&\fBextract\fR, \&\fBlist\fR. .IP "\fBnew\fR \fI\f(CI%opts\fI\fR" 4 .IX Item "new %opts" Creates a new Arch::Tarball object. .Sp The following parameters can be set via \fI\f(CI%opts\fI\fR: .RS 4 .IP "\fBtar\fR" 4 .IX Item "tar" The name of the \fItar\fR executable. Defaults to \f(CW\*(C`tar\*(C'\fR. .IP "\fBfile\fR" 4 .IX Item "file" The filename of the Tarball. .RE .RS 4 .RE .IP "\fBcreate\fR \fI\f(CI%opts\fI\fR" 4 .IX Item "create %opts" Creates a new tarball (tar.gz) from a given directory structure. .Sp \&\fBcreate\fR understands the following options: .RS 4 .IP "\fBdir\fR (mandatory)" 4 .IX Item "dir (mandatory)" Specifies the base directory for the tarball. The given directory and recursively its content will be added to the tarball. The directory's basename will be used as the first and the only subdirectory in the tarball. .IP "\fBbase_name\fR" 4 .IX Item "base_name" Allow the programmer to specify a different base directory name for the tarball content than the basename of \fBdir\fR. In this case, \&'cp' process is launched to temporarily rename the last element of \fBdir\fR. .IP "\fBpipe\fR" 4 .IX Item "pipe" When set, \fBcreate\fR does not create a physical tarball but writes the tarballs content to a newly created pipe. The pipe is returned by the \&\fBcreate\fR method. .RE .RS 4 .Sp \&\fBNote:\fR Currently the \fBpipe\fR option is mandatory. .RE .IP "\fBextract\fR \fI\f(CI%opts\fI\fR" 4 .IX Item "extract %opts" Extracts the tarball to a given target directory, specified by \fBdir\fR option. If \fBdir\fR option is not given, a temporary directory is created that will hold the extracted dirs/files. This directory is returned. .Sp The \fBfile\fR option specifies the tarball file name. It may be given in the constructor instead. .IP "\fBlist\fR \fI\f(CI%opts\fI\fR (not implemented yet)" 4 .IX Item "list %opts (not implemented yet)" Returns a list of files and directories in the tarball. .SH "BUGS" .IX Header "BUGS" Most functionality is currently not implemented. If you need part of the missing functionality, please contact the authors. .PP Patches are greatly appreciated. .SH "AUTHORS" .IX Header "AUTHORS" Mikhael Goikhman (migo@homemail.com\*(--Perl\-GPL/arch\-perl\*(--devel). .PP Enno Cramer (uebergeek@web.de\-\-2003/arch\-perl\*(--devel).