Alien::...egotiate(3)

πŸ’… Alien::Build::Plugin::Download::Negotiate β€” the download negotiation plugin, bestie

okay so real talk, this page is from the Alien::...egotiate(3) manual (user contributed Perl docs, yes ma'am) and it's version 2.88. it's giving "let the plugin do the choosing so you don't have to" and honestly? iconic. ✨


🌸 SYNOPSIS 🌸

use alienfile;
share {
  start_url 'http://ftp.gnu.org/gnu/make';
  plugin 'Download' => (
    filter => qr/^make-.*\.tar\.gz$/,
    version => qr/([0-9\.]+)/,
  );
};

like. look at that. that's the whole vibe. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

so this is a negotiator plugin for downloading packages off the internet, and the way it works is that it picks the best Fetch, Decode, and Prefer plugins to do the actual work for you. πŸ’–

which plugins it picks? depends on the properties you specify, plus your platform, plus your environment. lowkey a whole algorithm. highkey slay.

and here's the thing β€” it is usually preferable to use a negotiator plugin rather than the Fetch, Decode and Prefer plugins directly from your alienfile. so like, don't make it harder on yourself, bestie. 🫢


✨ PROPERTIES ✨

πŸ’œ url

[DEPRECATED] β€” use start_url instead. (not me showing up late to the party πŸ™ˆ)

this is the Initial URL for your package. it may be a directory listing (either in HTML or ftp listing format) or it could be the final tarball intended to be downloaded. either way, that's your starting point, girl.

πŸ’œ filter

this is a regular expression that lets you filter out files that you do not want to consider downloading. for example, if the directory listing contained tarballs and readme files like this:

foo-1.0.0.tar.gz
foo-1.0.0.readme

you could specify a filter of qr/\.tar\.gz$/ to make sure only tarballs are considered for download. bye to the readme, we don't know her. πŸ’€

πŸ’œ version

regular expression to parse out the version from a filename. the regular expression should store the result in $1. (yes, $1 specifically, no cap. ⭐)

note: if you provide a version property, this plugin will assume that you will be downloading an initial index to select package downloads from. depending on the protocol (and typically this is the case for http and HTML) that may bring in additional dependencies. if start_url points to a tarball or other archive directly (without needing to go through an index selection process), it is recommended that you not specify this property. fr fr, listen to the manpage.

πŸ’œ ssl

if your initial URL does not need SSL, but you know ahead of time that a subsequent request will need it (for example, if your directory listing is on http, but includes links to https URLs), then you can set this property to true, and the appropriate Perl SSL modules will be loaded. manifesting that SSL for later. 🌈

πŸ’œ passive

if using FTP, attempt a passive mode transfer first, before trying an active mode transfer. passive first, always. that's the energy. 🧚

πŸ’œ bootstrap_ssl

if set to true, then the download negotiator will avoid using plugins that have a dependency on Net::SSLeay, or other Perl SSL modules. the intent for this option is to allow OpenSSL to be alienized and be a useful optional dependency for Net::SSLeay. πŸ‘‘

the implementation may improve over time, but as of this writing, this option relies on you having a working curl or wget with SSL support in your PATH. so like, check your PATH first, bestie.

πŸ’œ prefer

how to sort candidates for selection. this should be one of three types of values:

  • code reference β€” this will be used as the prefer hook. πŸŽ€
  • true value β€” use Alien::Build::Plugin::Prefer::SortVersions. ✨
  • false value β€” don't set any preference at all. a hook must be installed, or another prefer plugin specified. (you gotta have something, girl. 😭)

πŸ’œ decoder

override the detected decoder. that's it, that's the whole description. sometimes you just know better than the detection. πŸ’…


πŸ‘‘ METHODS πŸ‘‘

🌸 pick

my($fetch, @decoders) = $plugin->pick;

returns the fetch plugin and any optional decoders that should be used. short king of a method, honestly. 🫢


πŸ’– SEE ALSO πŸ’–

  • Alien::Build::Plugin::Prefer::BadVersion
  • Alien::Build::Plugin::Prefer::GoodVersion

and also:

  • Alien::Build
  • alienfile
  • Alien::Build::MM
  • Alien

go read those too, iykyk. πŸ“šβœ¨


🫢 AUTHOR 🫢

Author: Graham Ollis <plicease@cpan.org> β€” the main character, periodt. πŸ‘‘

Contributors (the whole group chat, and we love every single one of them):

  • Diab Jerius (DJERIUS)
  • Roy Storey (KIWIROY)
  • Ilya Pavlov
  • David Mertens (run4flat)
  • Mark Nunberg (mordy, mnunberg)
  • Christian Walde (Mithaldu)
  • Brian Wightman (MidLifeXis)
  • Zaki Mughal (zmughal)
  • mohawk (mohawk2, ETJ)
  • Vikas N Kumar (vikasnkumar)
  • Flavio Poletti (polettix)
  • Salvador FandiΓ±o (salva)
  • Gianni Ceccarelli (dakkar)
  • Pavel Shaydo (zwon, trinitum)
  • Kang-min Liu (εŠ‰εΊ·ζ°‘, gugod)
  • Nicholas Shipp (nshp)
  • Juan JuliΓ‘n Merelo GuervΓ³s (JJ)
  • Joel Berger (JBERGER)
  • Petr PΓ­saΕ™ (ppisar)
  • Lance Wicks (LANCEW)
  • Ahmad Fatoum (a3f, ATHREEF)
  • JosΓ© JoaquΓ­n Atria (JJATRIA)
  • Duke Leto (LETO)
  • Shoichi Kaji (SKAJI)
  • Shawn Laffan (SLAFFAN)
  • Paul Evans (leonerd, PEVANS)
  • HΓ₯kon HΓ¦gland (hakonhagland, HAKONH)
  • nick nauwelaerts (INPHOBIA)
  • Florian Weimer
  • Marcel Telka (mtelka)

squad goals, truly. πŸŽ€πŸ’œ


this software is copyright (c) 2011-2022 by Graham Ollis.

this is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free as in go off, bestie. πŸ¦‹


okay that's the whole page!! this was perl v5.42.3, dated 2026-09-21, and that's a wrap on Alien::...egotiate(3) β€” mwah, take care of her, she's iconic πŸ’…πŸ’–βœ¨

πŸ“¦ where this page comes from