Archive::Any3pm
Single interface to deal with file archives.
Usage
use Archive::Any;my $archive = Archive::Any->new( 'archive_file.zip' );my @files = $archive->files;$archive->extract;my $type = $archive->type;$archive->is_impolite;$archive->is_naughty;
Version
version 0.0946
Overview
This module is a single interface for manipulating different archive formats. Tarballs, zip files, etc.
new-
my $archive = Archive::Any->new( $archive_file );my $archive_with_type = Archive::Any->new( $archive_file, $type );$typeis optional. It lets you force the file type in case Archive::Any can't figure it out.
extract-
$archive->extract;$archive->extract( $directory );Extracts the files in the archive to the given
$directory. If no$directoryis given, it will go into the current working directory.
files-
my @file = $archive->files;A list of files in the archive.
mime_type-
my $mime_type = $archive->mime_type();Returns the mime type of the archive.
is_impolite-
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.
is_naughty-
my $is_naughty = $archive->is_naughty;Checks to see if this archive is going to unpack
outsidethe current directory.
Deprecated
type-
my $type = $archive->type;Returns the type of archive. This method is provided for backwards compatibility in the Tar and Zip plugins and will be going away
soonin favor of"mime_type".
Plugins
For detailed information on writing plugins to work with Archive::Any, please see the pod documentation for Archive::Any::Plugin.
Support
You can find documentation for this module with the perldoc command.
perldoc Archive::Any
You can also look for information at:
- •
-
MetaCPAN
<https://metacpan.org/module/Archive::Any>
- •
-
Issue tracker
<https://github.com/oalders/archive-any/issues>
Copyright and license
This software is copyright (c) 2016 by Michael G Schwern, Clint Moore, Olaf Alders.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Releases
9 releases since Debian 5.0 (Lenny); the text changed 2 times.