Archive::Libarchive::Archive - Libarchive archive base object
version 0.08
# handle errors correctly. my $code = $r->read_data(\$data); if($code == ARCHIVE_WARN) { warn $r->error_string; } elsif($code == ARCHIVE_FAIL || $code == ARCHIVE_FATAL) { die $r->error_string; }
This class is a base class for all archive classes in Archive::Libarchive.
This is a subset of total list of methods available to all archive classes. For the full list see "Archive::Libarchive::Archive" in Archive::Libarchive::API.
# archive_entry_new2 my $e = $ar->entry;
This method creates a new Archive::Libarchive::Entry instance, like when you create an instance with that class' new method, except this form will pull character-set conversion information from the specified archive instance.
# archive_errno my $int = $ar->errno;
Returns the system errno code for the archive instance. For non-system level errors, this will not have a sensible value.
errno
# archive_error_string my $string = $ar->error_string;
Returns a human readable diagnostic of error for the corresponding archive instance.
# archive_clear_error $ar->clear_error;
Clear the error for the corresponding archive instance.
# archive_set_error $ar->set_error($errno, $string);
This will set the errno code and human readable diagnostic for the archive instance. Not all errors have a corresponding errno code, so you can set that to zero (0) in that case.
0
# archive_filter_code my $code = $ar->filter_code($num);
This will return the filter code at position $num. For the total number of positions see the filter_count method.
$num
The constant prefix for this method is ARCHIVE_FILTER_. This will return a dualvar where the string is the lowercase name without the prefix and the integer is the constant value. For the full list see "CONSTANTS" in Archive::Libarchive::API.
ARCHIVE_FILTER_
# archive_format my $code = $ar->format;
This will return the format code at position $num.
The constant prefix for this method is ARCHIVE_FORMAT_. This will return a dualvar where the string is the lowercase name without the prefix and the integer is the constant value. For the full list see "CONSTANTS" in Archive::Libarchive::API.
ARCHIVE_FORMAT_
Provides an interface for listing and retrieving entries from an archive without extracting them to the local filesystem.
Provides an interface for extracting arbitrary archives of any format/filter supported by libarchive.
libarchive
Decompresses / unwraps files that have been compressed or wrapped in any of the filter formats supported by libarchive
This is the main top-level module for using libarchive from Perl. It is the best place to start reading the documentation. It pulls in the other classes and libarchive constants so that you only need one use statement to effectively use libarchive.
use
This contains the full and complete API for all of the Archive::Libarchive classes. Because libarchive has hundreds of methods, the main documentation pages elsewhere only contain enough to be useful, and not to overwhelm.
This class is used for reading from archives.
This class is for creating new archives.
This class is for reading Archive::Libarchive::Entry objects from disk so that they can be written to Archive::Libarchive::ArchiveWrite objects.
This class is for writing Archive::Libarchive::Entry objects to disk that have been written from Archive::Libarchive::ArchiveRead objects.
This class represents a file in an archive, or on disk.
This class exposes the libarchive link resolver API.
This class exposes the libarchive match API.
Build Dist::Zilla based dist tarballs with libarchive instead of the built in Archive::Tar.
If a suitable system libarchive can't be found, then this Alien will be installed to provide it.
The libarchive project home page.
The libarchive project wiki.
Some of the libarchive man pages are listed here.
Graham Ollis <plicease@cpan.org>
This software is copyright (c) 2021,2022 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Archive::Libarchive, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Archive::Libarchive
CPAN shell
perl -MCPAN -e shell install Archive::Libarchive
For more information on module installation, please visit the detailed CPAN module installation guide.