Archive-Libarchive
view release on metacpan or search on metacpan
lib/Archive/Libarchive.pm view on Meta::CPAN
}
else
{
$v{libzstd} = 'undef';
}
foreach my $mod (qw( FFI::Platypus Archive::Libarchive FFI::CheckLib Alien::Libarchive3 Foo ))
{
my $version = $mod->VERSION;
$v{$mod} = $version if defined $version;
}
%v;
}
require Archive::Libarchive::Lib::Constants unless $Archive::Libarchive::no_gen;
our @EXPORT_OK = grep /^(archive|ARCHIVE|AE)_/, keys %Archive::Libarchive::;
our %EXPORT_TAGS = (
all => \@EXPORT_OK,
const => [grep /^(ARCHIVE|AE)_/, @EXPORT_OK],
func => [grep /^archive_/, @EXPORT_OK],
);
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Archive::Libarchive - Modern Perl bindings to libarchive
=head1 VERSION
version 0.09
=head1 SYNOPSIS
use 5.020;
use Archive::Libarchive qw( :const );
my $r = Archive::Libarchive::ArchiveRead->new;
$r->support_filter_all;
$r->support_format_all;
$r->open_filename("archive.tar", 10240) == ARCHIVE_OK
or die $r->error_string;
my $e = Archive::Libarchive::Entry->new;
say $e->pathname while $r->next_header($e) == ARCHIVE_OK;
=head1 DESCRIPTION
This module provides a Perl object-oriented interface to the C<libarchive> library. The C<libarchive>
library is the API used to implemnt C<bsdtar>, the default tar implementation on a number of operating systems,
including FreeBSD, macOS and Windows. It can also be installed on most Linux distributions. But wait, there
is more, C<libarchive> supports a number of formats, compressors and filters transparently, so it can be a useful
when used as a universal archiver/extractor. Supported formats include:
=over 4
=item various tar formats, including the oldest forms and the newest extensions
=item zip
=item ISO 9660 (CD-ROM image format)
=item gzip
=item bzip2
=item uuencoded files
=item shell archive (shar)
=item ... and many many more
=back
There are a number of "simple" interfaces around this distribution, which are worth considering if you do not need
the full power and configurability that this distribution provides.
=over 4
=item L<Archive::Libarchive::Peek>
Provides an interface for listing and retrieving entries from an archive without extracting them to the local filesystem.
=item L<Archive::Libarchive::Extract>
Provides an interface for extracting arbitrary archives of any format/filter supported by C<libarchive>.
=item L<Archive::Libarchive::Unwrap>
Decompresses / unwraps files that have been compressed or wrapped in any of the filter formats supported by C<libarchive>
=back
This distribution is split up into several classes, that correspond to C<libarchive> classes. Probably the best
place to start when learning how to use this module is to look at the L</EXAMPLES> section below, but you
can also take a look at the main class documentation for the operation that you are interested in as well:
=over 4
=item L<Archive|Archive::Libarchive::Archive> =E<gt> L<Archive::Libarchive::ArchiveRead>
Class for reading from archives.
=item L<Archive|Archive::Libarchive::Archive> =E<gt> L<Archive::Libarchive::ArchiveWrite>
Class for creating new archives.
=item L<Archive|Archive::Libarchive::Archive> =E<gt> L<ArchiveRead|Archive::Libarchive::ArchiveRead> =E<gt> L<Archive::Libarchive::DiskRead>
Class for reading file entries from a local filesystem.
=item L<Archive|Archive::Libarchive::Archive> =E<gt> L<ArchiveWrite|Archive::Libarchive::ArchiveWrite> =E<gt> L<Archive::Libarchive::DiskWrite>
( run in 0.466 second using v1.01-cache-2.11-cpan-2398b32b56e )