AnnoCPAN::Archive - Simple archive abstraction layer
AnnoCPAN is expected to handle both tar.gz and zip archives. Archive::Tar and Archive::Zip take care of accessing those types of files, but they have different interfaces. AnnoCPAN::Archive provides a common interface to the very few methods that are actually needed.
Create a new AnnoCPAN::Archive object. It uses the filename extension, which must be .zip or .tar.gz, to determine the type of archive. Returns undefined if there is any problem.
Returns a list of the filenames contained in the archive.
Returns as a string the contents of file $fname in the archive.
There are other modules on CPAN, such as Archive::Any, Archive::Extract, and File::Archive, that seem to do similar things, but they didn't appear to do exactly what I wanted or seemed too complicated, so I resorted to rolling my own. It was just a dozen lines of code (heck, this documentation is way longer than the code itself!)
Ivan Tubert-Brohman <firstname.lastname@example.org>
Copyright (c) 2005 Ivan Tubert-Brohman. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.