Archive::Any(3pm)

πŸ“¦
version 0.0946 Β· 4 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

✨ 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 🫢


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