Archive::Any(3pm)
β¨ Archive::Any β¨
okay bestie, so this is Archive::Any β your one-stop single interface to deal with file archives π
version 0.0946 β yes she has a version number, she's official, she's iconic π
πΈ SYNOPSIS πΈ
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;
likeβ¦ look at her. so clean. so effortless. no cap β¨
π DESCRIPTION π
This module is a single interface for manipulating different archive formats. Tarballs, zip files, etc. Basically you don't gotta learn ten different APIs, you learn one, and she handles the rest. main character energy fr π¦
π§ new
my $archive = Archive::Any->new( $archive_file );
my $archive_with_type = Archive::Any->new( $archive_file, $type );
$type is optional. It lets you force the file type in case Archive::Any can't figure it out. like when she's being mysterious and you're just standing there going "girl what ARE you" π so you tell her. you tell her the type. problem solved π
π extract
$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. periodt. that's where she's unpacking. right there. in front of everyone π
π files
my @file = $archive->files;
A list of files in the archive. that's it. that's the whole vibe. a little list, a little slay π
π mime_type
my $mime_type = $archive->mime_type();
Returns the mime type of the archive. she's telling you what she is, not what she's called. iykyk π
π 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. Rude? lowkey yes. Hence the name bestie, hence the name π
β is_naughty
my $is_naughty = $archive->is_naughty;
Checks to see if this archive is going to unpack outside the current directory. ma'am. MA'AM. absolutely not. π€π©
π DEPRECATED π
okay so this one is on her way out. she's serving but she's leaving. use mime_type instead, fr fr.
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 soon in favor of "mime_type". like, don't get attached. she's got one foot out the door already π
π¦ PLUGINS π¦
For detailed information on writing plugins to work with Archive::Any, please see the pod documentation for Archive::Any::Plugin. yes you can make your own, yes you can be part of the lore, yes this is your moment β¨
π₯ SEE ALSO π₯
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>
π AUTHORS π
- Clint Moore
- Michael G Schwern (author emeritus)
- Olaf Alders (current maintainer)
three legends. the way that they carried this module. ate and left no crumbs π«Ά
π 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.
and that's the whole page bestie π this one's from perl v5.28.1, dated 2019-07-20 β so yeah she's been on the scene for a minute and she's still serving π mwah, go unzip something responsibly, ily πβ¨
π¦ where this page comes from
- debian bookworm: libarchive-any-perl 0.0946-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libarchive-any-perl 0.0946-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libarchive-any-perl 0.0946-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libarchive-any-perl 0.0946-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms