CPAN::Access::AdHoc::Archive::Zip - Provide a consistent interface to Archive::Zip
use CPAN::Access::AdHoc::Archive::Zip; use LWP::UserAgent; my $ua = LWP::UserAgent->new(); my $resp = $ua->get( ... ); my $tar = CPAN::Access::AdHoc::Archive::Zip->new( content => \( $resp->content() ), encoding => $resp->header( 'Content-Encoding' ), );
This class supports the following public methods over and above those supported by its superclass, or with functionality over and above that of the superclass.
This override of the superclass'
new() method instantiates the object, and possibly loads it. There are two supported arguments:
This is the content to be loaded into the object. A scalar reference is assumed to be the literal content. A non-reference is assumed to be the file name. Any other value is unsupported.
However specified, the value must represent a valid zip file.
This is the MIME encoding of the content. It is ignored if the content is not present. Since the zip format implies its own encoding, this argument may only be specified as
This method returns the content of the named item in the archive. It is simply a wrapper for
Unfortunately, Zip file entry time stamps are in local time, and there is no zone information included. This means that unless this is called in the same time zone in which the Zip entry was created you get the wrong time. In other words, the results of this method are useless.
This method lists the contents of the archive. It is simply a wrapper for
The parent class, Archive::Zip.
Support is by the author. Please file bug reports at http://rt.cpan.org, or in electronic mail to the author.
Thomas R. Wyant, III wyant at cpan dot org
Copyright (C) 2012-2013 by Thomas R. Wyant, III
This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.