1Archive::Any(3) User Contributed Perl Documentation Archive::Any(3)
2
3
4
6 Archive::Any - Single interface to deal with file archives.
7
9 use Archive::Any;
10
11 my $archive = Archive::Any->new($archive_file);
12
13 my @files = $archive->files;
14
15 $archive->extract;
16
17 my $type = $archive->type;
18
19 $archive->is_impolite;
20 $archive->is_naughty;
21
23 This module is a single interface for manipulating different archive
24 formats. Tarballs, zip files, etc.
25
26 new
27 my $archive = Archive::Any->new($archive_file);
28 my $archive = Archive::Any->new($archive_file, $type);
29
30 $type is optional. It lets you force the file type in-case Ar‐
31 chive::Any can't figure it out.
32
33 extract
34 $archive->extract;
35 $archive->extract($directory);
36
37 Extracts the files in the archive to the given $directory. If no
38 $directory is given, it will go into the current working directory.
39
40 files
41 my @file = $archive->files;
42
43 A list of files in the archive.
44
45 mime_type
46 my $mime_type = $archive->mime_type();
47
48 Returns the mime type of the archive.
49
50 is_impolite
51 my $is_impolite = $archive->is_impolite;
52
53 Checks to see if this archive is going to unpack into the current
54 directory rather than create its own.
55
56 is_naughty
57 my $is_naughty = $archive->is_naughty;
58
59 Checks to see if this archive is going to unpack outside the cur‐
60 rent directory.
61
63 type
64 my $type = $archive->type;
65
66 Returns the type of archive. This method is provided for backwards
67 compatibility in the Tar and Zip plugins and will be going away
68 soon in favor of "mime_type".
69
71 For detailed information on writing plugins to work with Archive::Any,
72 please see the pod documentation for Archive::Any::Plugin.
73
75 Clint Moore <cmoore@cpan.org>
76
78 Michael G Schwern
79
81 Archive::Any::Plugin
82
84 You can find documentation for this module with the perldoc command.
85
86 perldoc Archive::Any
87
88 You can also look for information at:
89
90 * AnnoCPAN: Annotated CPAN documentation
91 <http://annocpan.org/dist/Archive-Any>
92
93 * CPAN Ratings
94 <http://cpanratings.perl.org/d/Archive-Any>
95
96 * RT: CPAN's request tracker
97 <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Archive-Any>
98
99 * Search CPAN
100 <http://search.cpan.org/dist/Archive-Any>
101
103 This program is free software; you can redistribute it and/or modify it
104 under the same terms as Perl itself.
105
106 See <http://www.perl.com/perl/misc/Artistic.html>
107
108
109
110perl v5.8.8 2007-05-09 Archive::Any(3)