Contents

File::Raw::Archive::Reader

Sequential archive iterator.

File-Raw-Archive 0.04, from its POD. On MetaCPAN.

SYNOPSIS

my $r = File::Raw::Archive->open("foo.tar");
while (my $entry = $r->next) {
    next if $entry->is_dir;
    my $bytes = $entry->slurp;
}
$r->close;

DESCRIPTION

A File::Raw::Archive::Reader is returned by open in File::Raw::Archive. It wraps an open file descriptor and a format plugin cursor, and emits File::Raw::Archive::Entry objects one at a time in archive order.

METHODS

  • next

    Advance to the next entry in the archive. If the previous entry's payload was never consumed it is drained automatically before advancing.

    Returns a File::Raw::Archive::Entry object, or undef when the archive is exhausted. Croaks if the reader has already been closed or if the archive data is malformed.

    while (my $entry = $r->next) {
        next if $entry->is_dir;
        process($entry->slurp);
    }
    
  • close

    Close the underlying file descriptor and release all resources. Idempotent; called automatically by DESTROY if the caller does not close explicitly.

SEE ALSO

File::Raw::Archive, File::Raw::Archive::Entry.

AUTHOR

LNATION <email@lnation.org>

This software is Copyright (c) 2026 by LNATION <email@lnation.org>.

This is free software, licensed under the Artistic License 2.0 (GPL Compatible).