Archive-Tar
view release on metacpan or search on metacpan
lib/Archive/Tar.pm view on Meta::CPAN
Note that in older versions of this module, the C<error()> method
would return an effectively global value even when called an instance
method as above. This has since been fixed, and multiple instances of
C<Archive::Tar> now have separate error strings.
=head2 $Archive::Tar::INSECURE_EXTRACT_MODE
This variable indicates whether C<Archive::Tar> should allow
files to be extracted outside their current working directory.
Allowing this could have security implications, as a malicious
tar archive could alter or replace any file the extracting user
has permissions to. Therefor, the default is to not allow
insecure extractions.
If you trust the archive, or have other reasons to allow the
archive to write files outside your current working directory,
set this variable to C<true>.
Note that this is a backwards incompatible change from version
C<1.36> and before.
=head2 $Archive::Tar::EXTRACT_HARDLINK
Prior to version C<3.06> Archive::Tar would honour hardlinks in
archives. Version C<3.06> and onwards will skip hardlinks unless
this flag is set. Exercise caution when enabling this.
=head2 $Archive::Tar::HAS_PERLIO
This variable holds a boolean indicating if we currently have
C<perlio> support loaded. This will be enabled for any perl
greater than C<5.8> compiled with C<perlio>.
If you feel strongly about disabling it, set this variable to
C<false>. Note that you will then need C<IO::String> installed
to support writing stringified archives.
Don't change this variable unless you B<really> know what you're
doing.
=head2 $Archive::Tar::HAS_IO_STRING
This variable holds a boolean indicating if we currently have
C<IO::String> support loaded. This will be enabled for any perl
that has a loadable C<IO::String> module.
If you feel strongly about disabling it, set this variable to
C<false>. Note that you will then need C<perlio> support from
your perl to be able to write stringified archives.
Don't change this variable unless you B<really> know what you're
doing.
=head2 $Archive::Tar::ZERO_PAD_NUMBERS
This variable holds a boolean indicating if we will create
zero padded numbers for C<size>, C<mtime> and C<checksum>.
The default is C<0>, indicating that we will create space padded
numbers. Added for compatibility with C<busybox> implementations.
=head2 Tuning the way RESOLVE_SYMLINK will works
You can tune the behaviour by setting the $Archive::Tar::RESOLVE_SYMLINK variable,
or $ENV{PERL5_AT_RESOLVE_SYMLINK} before loading the module Archive::Tar.
Values can be one of the following:
=over 4
=item none
Disable this mechanism and failed as it was in previous version (<1.88)
=item speed (default)
If you prefer speed
this will read again the whole archive using read() so all entries
will be available
=item memory
If you prefer memory
=back
Limitation: It won't work for terminal, pipe or sockets or every non seekable
source.
=head2 $Archive::Tar::EXTRACT_BLOCK_SIZE
This variable holds an integer with the block size that should be used when
writing files during extraction. It defaults to 1 GiB. Please note that this
cannot be arbitrarily large since some operating systems limit the number of
bytes that can be written in one call to C<write(2)>, so if this is too large,
extraction may fail with an error.
=head2 $Archive::Tar::MAX_FILE_SIZE
This variable holds an upper bound on the per-entry declared size that
C<Archive::Tar> will accept when reading an archive. Entries whose header
claims a larger size are refused with an error before any read allocation.
Defaults to 1 GiB. Set to 0 to disable the cap.
=cut
=head1 FAQ
=over 4
=item What's the minimum perl version required to run Archive::Tar?
You will need perl version 5.005_03 or newer.
=item Isn't Archive::Tar slow?
Yes it is. It's pure perl, so it's a lot slower then your C</bin/tar>
However, it's very portable. If speed is an issue, consider using
C</bin/tar> instead.
( run in 2.851 seconds using v1.01-cache-2.11-cpan-99c4e6809bf )