| 1 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | ▶ | use 5.020; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 0 | ▶ | use Archive::Libarchive qw( ARCHIVE_OK ); |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 5 | |||
| 6 | my $r = Archive::Libarchive::ArchiveRead->new; | ||
| 7 | $r->support_filter_all; | ||
| 8 | $r->support_format_all; | ||
| 9 | |||
| 10 | my $ret = $r->open_filename("archive.tar", 10240); | ||
| 11 | if($ret != ARCHIVE_OK) { | ||
| 12 | exit 1; | ||
| 13 | } | ||
| 14 | |||
| 15 | my $e = Archive::Libarchive::Entry->new; | ||
| 16 | while($r->next_header($e) == ARCHIVE_OK) { | ||
| 17 | say $e->pathname; | ||
| 18 | $r->read_data_skip; | ||
| 19 | } | ||