Dist::...nstall(3pm)

πŸ“¦
version 0.012 Β· 2 versions
, in fedora 43

✨ NAME ✨

Dist::Zilla::Plugin::StaticInstall β€” bestie, this is the plugin that looks at your distro and goes "yeah, this one can do a static install" πŸ’… (that's the whole personality, and it's iconic)


🌸 VERSION 🌸

version 0.012 β€” yes queen, we're on 0.012 πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

Drop this in your dist.ini, ok? Like, in your actual dist.ini:

; when you are confident this is correct
[StaticInstall]
mode = on

; trust us to set the right value (DANGER!)
[StaticInstall]
mode = auto

; be conservative; just tell us what the value should be
[StaticInstall]
mode = auto
dry_run = 1

That's it. That's the vibe. ✨


πŸ’– DESCRIPTION πŸ’–

Okay so, this is a Dist::Zilla plugin and what it does is β€” when mode is on β€” it hands over this distribution metadata for you:

x_static_install : "1"

But it's not just blindly doing that, no ma'am. The plugin runs a whole battery of checks against your distribution to figure out what the right value of the x_static_install metadata field should actually be. When that field is set to a true value, it means you can skip a bunch of installation steps (like running Makefile.PL or Build.PL and dealing with whatever side effects those little guys decide to have). πŸ‘‘

The definition of a "static installation" is currently being prototyped by the Perl Toolchain Gang and is still being refined. So listen:

DO NOT USE THIS PLUGIN if you are not involved in this testing. πŸ’€ The proper installation of the built distribution cannot be guaranteed if installed with a static install-enabled client. Like, fr fr, do not.

The tentative specification is spelled out in more detail right here: <https://github.com/Leont/cpan-static/blob/master/lib/CPAN/Static/Spec.pm>

So, this plugin currently checks these conditions β€” and if all of them are true, x_static_install can be true:

  • dynamic_config must be false in metadata
  • no prerequisites in configure-requires other than ExtUtils::MakeMaker, Module::Build::Tiny, or File::ShareDir::Install
  • no prerequisites in build-requires
  • no files to be installed as executables outside of the script directory
  • no module sharedir (a distribution sharedir is okay 🫢)
  • no installer plugins permitted other than:
    • Dist::Zilla::Plugin::MakeMaker
    • Dist::Zilla::Plugin::MakeMaker::Fallback
    • Dist::Zilla::Plugin::ModuleBuildTiny
    • Dist::Zilla::Plugin::ModuleBuildTiny::Fallback
  • an installer plugin from the above list must be used (a manually-generated Makefile.PL or Build.PL is not permitted, sorry bestie 😭)
  • no other plugins may modify Makefile.PL nor Build.PL
  • the [MetaJSON] plugin must be used, at (the default) meta-spec version 2
  • no .xs files may be present
  • .pm, .pod, .pl files may not be present in the root of the distribution or in BASEEXT (where BASEEXT is the last component of the distribution name)
  • .pmc and .PL files (excluding Makefile.PL, Build.PL) may not be present
  • files in lib/ other than .pod, .pm may not be present

That's the whole checklist. It's giving thorough. πŸ’…


πŸŽ€ CONFIGURATION OPTIONS πŸŽ€

⭐ "mode" ⭐

  • When set to on, the value of x_static_install is set to 1 (the normal usecase, the everyday slay).
  • When set to off, the value of x_static_install is set to 0, which is equivalent to not providing this field at all. Same energy, basically.
  • When set to auto, we attempt to calculate the proper value. When used with dry_run = 1, the value isn't actually stored, but just provided in a diagnostic message. This is the recommended usage in a plugin bundle, for testing against a number of distributions at once. 🧚

The calculations are always performed, no matter the value of mode β€” and if it comes up with a different result than what you are setting, this is logged. So you'll know. And listen: if mode = on and the calculations discover the distribution is ineligible for this flag, the build fails, to prevent you from releasing bad metadata. It's protective, it's a guard dog, it's main character energy. πŸ”₯

πŸ’œ "dry_run" πŸ’œ

When true, no value is set in metadata, but verbose logging is enabled so you can see what the value would have been. Perfect for peeking without committing. πŸ™ˆ


🌈 SEE ALSO 🌈


🫢 SUPPORT 🫢

Bugs may be submitted through the RT bug tracker <https://rt.cpan.org/Public/Dist/Display.html?Name=Dist-Zilla-Plugin-StaticInstall> (or <bug-Dist-Zilla-Plugin-StaticInstall@rt.cpan.org>).

There is also a mailing list available for users of this distribution, at <http://dzil.org/#mailing-list>.

There is also an irc channel available for users of this distribution, at #distzilla on irc.perl.org <irc://irc.perl.org/#distzilla>.

I am also usually active on irc, as 'ether' at irc.perl.org. πŸ‘‘


πŸ’œ AUTHOR πŸ’œ

Karen Etheridge <ether@cpan.org> β€” icon, legend, the moment. πŸŽ€


This software is copyright (c) 2015 by Karen Etheridge.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Slay.


And that's a wrap, bestie!! πŸ’– This page came to you courtesy of perl v5.42.0, dated 2025-07-25, and it lives under the name Dist::...nstall(3pm) β€” you know the vibe, iykyk. Now go forth and don't set mode = auto unless you mean it. βœ¨πŸ’…πŸ¦‹

πŸ“¦ where this page comes from