Module...ANfile(3pm)

πŸ“¦
version 0.02 Β· 4 versions
, in opensuse-leap 16.0

πŸ’… Module::Build::Prereqs::FromCPANfile πŸ’…

okay so bestie, this is one of the User Contributed Perl Documentation pages β€” yep, the whole 3pm situation β€” and it's genuinely such a little slay. It's Module::Build::Prereqs::FromCPANfile, which is a lot of words, I know, but stay with me 🫢


✨ NAME ✨

Module::Build::Prereqs::FromCPANfile β€” literally it constructs prereq parameters of Module::Build from cpanfile. That's the whole vibe. No cap.


πŸŽ€ SYNOPSIS πŸŽ€

like, here's how you'd actually use it:

use Module::Build;
use Module::Build::Prereqs::FromCPANfile;

Module::Build->new(
    ...,
    mb_prereqs_from_cpanfile()
)->create_build_script();

iconic. moving on πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

This simple module reads cpanfile and converts its content into valid prereq parameters for the new() method of Module::Build. it's giving "small but mighty", fr fr.

⚠️ Okay real talk for a sec: currently it does not support the "optional features" specification (see "feature" in cpanfile). So don't come for it about that πŸ™ˆ

🌸 EXPORTED FUNCTION 🌸

The following function is exported by default, so you don't have to ask twice πŸ’…

%prereq_params = mb_prereqs_from_cpanfile(%args)

Reads cpanfile, parses its content and returns the corresponding %prereq_params for Module::Build. chef's kiss.

The fields in %args are:

  • "version" => VERSION_STR β€” optional, default: $Module::Build::VERSION. This is the version number of the target Module::Build. If you omit it, Module::Build gets loaded and $Module::Build::VERSION is used. easy.
  • "cpanfile" => FILEPATH β€” optional, default: "cpanfile". This is the file path to the cpanfile that's gonna get loaded. If you omit it, it loads "cpanfile" in the current directory. yes bestie, the current directory, look at it go ✨

🧚 SEE ALSO 🧚

  • Module::Build
  • Module::Build::Pluggable::CPANfile β€” okay so maybe this module does the same job better, but lowkey it has a heavier dependency. you win some, you install some 😭

🌈 REPOSITORY 🌈

<https://github.com/debug-ito/Module-Build-Prereqs-FromCPANfile>

go star it, iykyk ⭐


πŸ”₯ BUGS AND FEATURE REQUESTS πŸ”₯

Please report bugs and feature requests to my Github issues: <https://github.com/debug-ito/Module-Build-Prereqs-FromCPANfile/issues>.

Although I prefer Github, non-Github users can use CPAN RT: <https://rt.cpan.org/Public/Dist/Display.html?Name=Module-Build-Prereqs-FromCPANfile>. Please send email to bug-Module-Build-Prereqs-FromCPANfile at rt.cpan.org to report bugs if you do not have a CPAN RT account. we got options, bestie 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Toshio Ito, "<toshioito at cpan.org>" β€” main character energy, honestly πŸ’œ


Copyright 2014 Toshio Ito.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See <http://dev.perl.org/licenses/> for more information.


and that's the whole page, bestie!! πŸŽ€βœ¨ it was documented with perl v5.42.0 back on 2020-11-04, so like… vintage. periodt. πŸ’…

πŸ“¦ where this page comes from