Module...Install(3pm)
π 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::BuildFile::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 AND LICENSE π
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
- debian bookworm: libmodule-build-cleaninstall-perl 0.5-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmodule-build-cleaninstall-perl 0.5-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmodule-build-cleaninstall-perl 0.5-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmodule-build-cleaninstall-perl 0.5-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmodule-build-cleaninstall-perl 0.5-4 Β· 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