Menlo(3pm)
β¨ Menlo β bestie edition β¨
okay so you found the manual page for Menlo (that's the Menlo(3pm) one, perl-people style π
). Sit down, grab a boba, we're doing this.
π NAME π
Menlo β it's a CPAN client, bestie. That's the whole vibe. π
πΈ DESCRIPTION πΈ
So <pink>Menlo</pink> is a backend for cpanm 2.0. Like, the goal was to take cpanm's insides and swap them out for a set of modules that are more flexible, more extensible, and honestly just easier to use. Glow-up era. β¨
π¦ COMPATIBILITY π¦
Menlo lives inside the cpanminus git repo, in the "Menlo" subdirectory. Find it at:
https://github.com/miyagawa/cpanminus
(Original page had it in angle brackets like <https://github.com/miyagawa/cpanminus>, just so you know. π«Ά)
And okay, tea time: Menlo::CLI::Compat started off as a straight-up copy of App::cpanminus::script. It's gonna go through a big refactor to extract all the bits out of it. The dream? That the end result is just a shim and translation layer that interprets command line options. Iconic, honestly. π
π₯ MOTIVATION π₯
cpanm has been a popular choice of CPAN package installer for many developers, because it is lightweight, fast, and requires no configuration in most environments. Truly the main character of installers. π
But β and this is the part where we sigh π β the way cpanm was implemented (one God class, and all modules packaged into one script with fatpacker) makes it difficult to extend, or to modify the behaviors at runtime. Unless you decide to fork the code or monkeypatch its hidden backend class. Which, no. π
cpanm also has no scriptable API or hook points. So if you wanna write a tool that works with cpanm, you basically have to work around its behavior by writing a shell wrapper, or by parsing the output of its standard out or a build log file. It's giving "we do a little crime". π
Menlo keeps the best aspects of cpanm: dependencies free, configuration free, lightweight, and fast to install CPAN modules. But also it's implemented as a standard perl module, available on CPAN, and you can extend its behavior by either using its modular interfaces, or by writing plugins to hook into its behaviors. Best of both worlds, fr fr. π«Ά
π FAQ π
π "Dependencies free? I see many prerequisites in Menlo."
Fair. Menlo is a set of libraries and it does use non-core CPAN modules as its dependencies. But the App-cpanminus distribution embeds Menlo and all of its runtime dependencies into a fatpacked binary</>, so you can install App-cpanminus or Menlo without having any CPAN client to begin with. Chicken-and-egg? Solved. π§
π "Is Menlo a new name for cpanm?"
Right now it's just a library name. But lowkey the author is comfortable calling this a new package name for cpanm 2's backend. Soβ¦ watch this space. π
π AUTHOR π
Tatsuhiko Miyagawa <miyagawa@bulknews.net>
π COPYRIGHT π
2010- Tatsuhiko Miyagawa
β LICENSE β
This software is licensed under the same terms as Perl. Slay.
πΈ SEE ALSO πΈ
cpanm
and that's the whole page, bestie, we ate and left no crumbs π
β¨ this was Menlo(3pm) from perl v5.36.0, dated 2022-12-13 β mwah, ily, go install something π«Άπ
π¦ where this page comes from
- debian bookworm: libmenlo-perl 1.9019-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmenlo-perl 1.9019-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmenlo-perl 1.9019-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libmenlo-perl 1.9019-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libmenlo-perl 1.9019-2 Β· 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