Archive::Any::Lite - simple CPAN package extractor
use strict; use warnings; use Archive::Any::Lite; my $tarball = 'foo.tar.gz'; my $archive = Archive::Any::Lite->new($tarball); $archive->extract('into/some/directory/');
This is a fork of Archive::Any by Michael Schwern and Clint Moore. The main difference is this works properly even when you fork(), and may require less memory to extract a tarball. On the other hand, this isn't pluggable (this only supports file formats used in the CPAN toolchains), and this doesn't check mime types (at least as of this writing).
my $archive = Archive::Any->new($archive_file);
Creates an object.
$archive->extract; $archive->extract($directory);
Extracts the files in the archive to the given $directory. If no $directory is given, it will go into the current working directory.
my @file = $archive->files;
A list of files in the archive.
my $is_impolite = $archive->is_impolite;
Checks to see if this archive is going to unpack into the current directory rather than create its own.
my $is_naughty = $archive->is_naughty;
Checks to see if this archive is going to unpack outside the current directory.
Deprecated. For backward compatibility only.
Archive::Any, Archive::Tar::Streamed
Archive::Any is written by Michael G Schwern and Clint Moore.
Kenichi Ishigaki, <ishigaki@cpan.org>
Copyright (C) 2012 by Kenichi Ishigaki.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Archive::Any::Lite, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Archive::Any::Lite
CPAN shell
perl -MCPAN -e shell install Archive::Any::Lite
For more information on module installation, please visit the detailed CPAN module installation guide.