![]() |
![]()
| ![]() |
![]()
NAMEArchive::Libarchive::Archive - Libarchive archive base object VERSIONversion 0.09 SYNOPSIS# 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; } DESCRIPTIONThis class is a base class for all archive classes in Archive::Libarchive. METHODSThis 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. entry# 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. errno# 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. error_string# archive_error_string my $string = $ar->error_string; Returns a human readable diagnostic of error for the corresponding archive instance. clear_error# archive_clear_error $ar->clear_error; Clear the error for the corresponding archive instance. set_error# 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. filter_code# 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. 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. format# 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. SEE ALSO
AUTHORGraham Ollis <plicease@cpan.org> COPYRIGHT AND LICENSEThis 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.
|