Module...Install(3pm)

πŸ“¦
version 0.5 Β· 2 versions
  • 0.5 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.5 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– Module::Build::CleanInstall β€” the perl manual page, bestie edition πŸ’–

okay so this is a User Contributed Perl Documentation page, manual section 3pm, and the module's full name is Module::Build::CleanInstall. that's the title up top, folded in, we move on πŸ’…


✨ NAME ✨

Module::Build::CleanInstall β€” a subclass of Module::Build that removes the old module before installing the new one. yes that's the whole vibe. out with the old, in with the new, no leftovers. 🧹✨


🌸 SYNOPSIS 🌸

here's how you actually use it, literally just like Module::Build:

use strict;
use warnings;

use Module::Build::CleanInstall;
my $builder = Module::Build::CleanInstall->new(
  ... # same as Module::Build
);
$builder->create_build_script;

that's it bestie. that's the whole thing. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

so Module::Build::CleanInstall is a subclass of Module::Build, right, and it has exactly one extra little feature: before it upgrades a module from an old version to a new one, it first removes the files installed by the previous version. iconic behaviour honestly.

why do you care? because sometimes the new version does not contain some files that the old one did, and when that happens it's necessary that those files don't just... stay there. lingering. haunting your install directory. πŸ’€ this module makes sure they're gone.

and since it's a subclass of Module::Build, you use it exactly like that module. no new syntax to learn, no new incantation, nothing. πŸŽ€

it does provide an additional action called uninstall, but you don't need to call it separately β€” nope β€” the install action will call it for you when invoked. so it's automatic. it just happens. main character energy. πŸ‘‘

so how does the uninstalling actually work? it removes the files listed in the installed module's packlist, which is the file that got created when the module was first installed. it's like a little receipt of everything you own, and this module uses that receipt to take it all back. πŸ§Ύβž‘οΈπŸ—‘οΈ


πŸ’œ SEE ALSO πŸ’œ

  • Module::Build
  • File::ShareDir::Tarball

go read those too, i'm obsessed with them fr fr πŸ“


πŸ”₯ SOURCE REPOSITORY πŸ”₯

http://github.com/jberger/Module-Build-CleanInstall

the code lives here, go look at it, it's giving open source πŸ’–


πŸ‘‘ AUTHOR πŸ‘‘

Joel Berger, <joel.a.berger@gmail.com>

hi joel, thank you for your service πŸ«‘πŸ’


Copyright (C) 2012 by Joel Berger

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

yes bestie it's free software β€” same terms as Perl itself, so go wild (responsibly, per the license, you know the deal) πŸ’…

and that's the whole page!! this was pulled from the perl v5.34.0 docs, dated 2022-06-15, manual page Module...Install(3pm) β€” love that for us. mwah, go clean-install something πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from