CPAN::Access::AdHoc::Archive::Tar - Provide consistent interface to Archive::Tar
use CPAN::Access::AdHoc::Archive::Tar; use LWP::UserAgent; my $ua = LWP::UserAgent->new(); my $resp = $ua->get( ... ); my $tar = CPAN::Access::AdHoc::Archive::Tar->new( content => \( $resp->content() ), encoding => $resp->header( 'Content-Encoding' ), );
This class is a subclass of Archive::Tar, provided for the convenience of CPAN::Access::AdHoc. It is private to the CPAN-Access-AdHoc package.
CPAN-Access-AdHoc
This class supports the following public methods over and above those supported by its superclass:
This override of the superclass' new() method instantiates the object, and possibly loads it. There are two supported arguments:
new()
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 content must represent a valid tar file.
This is the MIME encoding of the content. It is ignored if the content is not present. Encodings 'gzip' and 'x-bzip2' are supported. If not present, the content is assumed not to be encoded.
'gzip'
'x-bzip2'
This method returns the content of the named item in the archive. It is simply a wrapper for Archive::Tar->get_content().
Archive::Tar->get_content()
This method lists the contents of the archive. It is simply a wrapper for Archive::Tar->list_files().
Archive::Tar->list_files()
Archive::Tar
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.
To install CPAN::Access::AdHoc, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPAN::Access::AdHoc
CPAN shell
perl -MCPAN -e shell install CPAN::Access::AdHoc
For more information on module installation, please visit the detailed CPAN module installation guide.