1Archive::Any::Lite(3) User Contributed Perl DocumentationArchive::Any::Lite(3)
2
3
4

NAME

6       Archive::Any::Lite - simple CPAN package extractor
7

SYNOPSIS

9           use strict;
10           use warnings;
11           use Archive::Any::Lite;
12
13           local $Archive::Any::Lite::IGNORE_SYMLINK = 1; # for safety
14
15           my $tarball = 'foo.tar.gz';
16           my $archive = Archive::Any::Lite->new($tarball);
17           $archive->extract('into/some/directory/');
18

DESCRIPTION

20       This is a fork of Archive::Any by Michael Schwern and Clint Moore. The
21       main difference is this works properly even when you fork(), and may
22       require less memory to extract a tarball. On the other hand, this isn't
23       pluggable (this only supports file formats used in the CPAN
24       toolchains), and this doesn't check mime types (at least as of this
25       writing).
26

METHODS

28   new
29         my $archive = Archive::Any::Lite->new($archive_file);
30         my $archive = Archive::Any::Lite->new($archive_file, {tar_filter => qr/foo/});
31
32       Creates an object.  You can pass an optional hash reference for finer
33       control.
34
35   extract
36         $archive->extract;
37         $archive->extract($directory);
38         $archive->extract($directory, {tar_filter => qr/foo/});
39
40       Extracts the files in the archive to the given $directory. If no
41       $directory is given, it will go into the current working directory.
42
43       You can pass an optional hash reference for finer control. If passed,
44       options passed in "new" will be ignored.
45
46   files
47         my @file = $archive->files;
48
49       A list of files in the archive.
50
51   is_impolite
52         my $is_impolite = $archive->is_impolite;
53
54       Checks to see if this archive is going to unpack into the current
55       directory rather than create its own.
56
57   is_naughty
58         my $is_naughty = $archive->is_naughty;
59
60       Checks to see if this archive is going to unpack outside the current
61       directory.
62
63   type
64       Deprecated. For backward compatibility only.
65

GLOBAL VARIABLE

67   $IGNORE_SYMLINK
68       If set to true, symlinks (and hardlinks for tarball) will be ignored.
69

SEE ALSO

71       Archive::Any, Archive::Tar::Streamed
72

AUTHOR

74       Archive::Any is written by Michael G Schwern and Clint Moore.
75
76       Kenichi Ishigaki, <ishigaki@cpan.org>
77
79       Copyright (C) 2012 by Kenichi Ishigaki.
80
81       This program is free software; you can redistribute it and/or modify it
82       under the same terms as Perl itself.
83
84
85
86perl v5.36.0                      2023-01-19             Archive::Any::Lite(3)
Impressum