diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2011-01-02 14:49:50 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2011-01-02 14:49:50 +0000 |
commit | 29b2c8344e77a3f76ba5bb9d11b6f1120cbcbe2c (patch) | |
tree | 049f98db541dc3bed7c4e5b43806c1c5d096ae62 /usr.sbin/pkg_add/pod | |
parent | 0989245aaae543bb61854f71ccc0331457315b75 (diff) |
document optional prepare parameter
Diffstat (limited to 'usr.sbin/pkg_add/pod')
-rw-r--r-- | usr.sbin/pkg_add/pod/OpenBSD::Ustar.pod | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/pod/OpenBSD::Ustar.pod b/usr.sbin/pkg_add/pod/OpenBSD::Ustar.pod index 75967ea6ce5..ac04a8234c5 100644 --- a/usr.sbin/pkg_add/pod/OpenBSD::Ustar.pod +++ b/usr.sbin/pkg_add/pod/OpenBSD::Ustar.pod @@ -1,4 +1,4 @@ -$OpenBSD: OpenBSD::Ustar.pod,v 1.16 2010/09/14 10:04:36 espie Exp $ +$OpenBSD: OpenBSD::Ustar.pod,v 1.17 2011/01/02 14:49:49 espie Exp $ =head1 NAME @@ -66,6 +66,16 @@ Write access to an archive object C<$wrarc> occurs through a user-directed loop: obtain an archive entry through C<$o = $wrarc-E<gt>prepare($filename)>, which can be tweaked manually and then written to the archive. +C<prepare> takes an optional C<$destdir> parameter that will override the +archive destdination directory. +This can be used to prepare an archive entry from a temporary file, that +will be used for the real checks and contents of the archive, then set +the name to save before writing the actual entry: + + $o = $wrarc->prepare($tempfile, ''); + $o->set_name("othername"); + $o->write; + Most client software will specialize C<OpenBSD::Ustar> to their own needs. Note however that C<OpenBSD::Ustar> is not designed for inheritance. Composition (putting a C<OpenBSD::Ustar> object inside your class) and |