AnnoCPAN-0.22

NAME

AnnoCPAN::Archive - Simple archive abstraction layer

SYNOPSIS

DESCRIPTION

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.

METHODS

$class->new($fname)

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.

$obj->files

Returns a list of the filenames contained in the archive.

$obj->read_file($fname)

Returns as a string the contents of file $fname in the archive.

SEE ALSO

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!)

AUTHOR

Ivan Tubert-Brohman <itub@cpan.org>

COPYRIGHT

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.

Module Install Instructions

To install AnnoCPAN::Archive, simply copy and paste either of the commands in to your terminal

As a valued partner and proud supporter of MetaCPAN, StickerYou is
happy to offer a 10% discount on all Custom Stickers,
Business Labels, Roll Labels,
Vinyl Lettering or Custom Decals. StickerYou.com
is your one-stop shop to make your business stick.
Use code METACPAN10 at checkout to apply your discount.