in reply to Re^2: Is there an IO::*-like interface for accessing tar files?
in thread Is there an IO::*-like interface for accessing tar files?

Since a tar file contains an index, how would the getline() method behave? Would you anticipate being able to iterate through each file within the tar file and then use an IO:: object on each virtual file within that archive (where getline() would apply)?

Just trying to clarify your expectations for my understanding.

--MidLifeXis

Replies are listed 'Best First'.
Re^4: Is there an IO::*-like interface for accessing tar files?
by atcroft (Abbot) on Feb 26, 2015 at 14:54 UTC

    Yes, ideally a way to access (iterate through?) the contained files, and for a particular contained file a way to read line by line through that file.

      I wonder if you couldn't create a thin layer over Archive::Tar providing the IO::Dir interface for the TAR file itself, a method for opening the file name providing an IO::$something (IO::Handle perhaps) interface for a file handle created out of a scalarref from the Archive::Tar::File's get_content_by_ref method.

      Interested in this because I have a similar use case a couple of layers down on my todo list.

      --MidLifeXis