Module...romPod(3pm)
π Module::Install::ReadmeFromPod β bestie edition π
okay so this is Module...romPod(3pm) from the User Contributed Perl Documentation, and it's genuinely one of the most "wait that's so smart" little extensions out there. it's a Module::Install extension that auto-converts your POD into a README, so you never have to hand-write that thing again. no cap.
β¨ NAME β¨
Module::Install::ReadmeFromPod β a Module::Install extension that automatically converts POD to a README π
πΈ SYNOPSIS πΈ
# In Makefile.PL
use inc::Module::Install;
author 'Vestan Pants';
license 'perl';
readme_from 'lib/Some/Module.pm';
readme_from 'lib/Some/Module.pm', { clean => 1, format => 'htm', output_file => 'SomeModule.html' };
so like. a README file will be generated from the POD of the module file you point at. that's the whole vibe. π
heads up bestie: the author needs to make sureModule::Install::ReadmeFromPodis installed before running theMakefile.PL. (the extension gets bundled into the user-side distribution, so your users are fine β it's just you who needs it.) π«Ά
π¦ DESCRIPTION π¦
Module::Install::ReadmeFromPod is a Module::Install extension that generates a README file automatically from an indicated file containing POD, whenever the author runs Makefile.PL. it's giving β¨automationβ¨.
several output formats are supported: plain-text, HTML, PDF or manpage. pick your fighter. π
π COMMANDS π
this plugin adds the following Module::Install command:
readme_fromβ does literally nothing on the user-side. on the author-side it will generate aREADMEfile.
readme_from 'lib/Some/Module.pm';
if a second parameter is set to a true value, then the README will be removed at make distclean.
readme_from 'lib/Some/Module.pm', 1;
a third parameter can be used to determine the format of the README file.
readme_from 'lib/Some/Module.pm', 1, 'htm';
valid formats for this third parameter are:
txt,textβ produce a plain-textREADMEfile using Pod::Text. the'txt'format is the default. (default behaviour, we love her for that π)htm,htmlβ produce an HTMLREADME.htmfile using Pod::Html.manβ produce aREADME.1manpage using Pod::Man.mdβ produce aREADME.mdfile using Pod::Markdown.pdfβ produce a PDFREADME.pdffile with App::pod2pdf if this module is installed.
a fourth parameter can be used to supply an output filename.
readme_from 'lib/Some/Module.pm', 0, 'pdf', 'SomeModule.pdf';
finally, you can pass additional arguments to the POD formatter that handles the requested format.
my @options = ( 'release' => 1.03, 'section' => 8 ); # options for Pod::Man
readme_from 'lib/Some/Module.pm', 1, 'man', undef, @options;
but instead of passing this long list of optional arguments to readme_from, you should probably pass these arguments as a named hashref for clarity. (fr fr, your future self will thank you π)
my @options = ( 'release' => 1.03, 'section' => 8 );
readme_from 'lib/Some/Module.pm', {clean => 1, format => 'man', output_file => undef, options => @options};
if you use the all_from command, readme_from will default to that value. iconic behaviour honestly.
all_from 'lib/Some/Module.pm';
readme_from; # Create README from lib/Some/Module.pm
readme_from '','clean'; # Put a empty string before 'clean'
π AUTHOR π
Chris "BinGOs" Williams β absolute legend, ate and left no crumbs. π
π LICENSE π
Copyright Β© Chris Williams
this module may be used, modified, and distributed under the same terms as Perl itself. please see the license that came with your Perl distribution for details. π
π SEE ALSO π
Module::InstallPod::TextPod::HtmlPod::ManPod::MarkdownApp::pod2pdf
and that's the whole page bestie!! this one shipped as part of perl v5.36.0, dated 2022-12-06, in the User Contributed Perl Documentation, filed under Module...romPod(3pm). go generate that README, you main character. πβ¨π¦
π¦ where this page comes from
- debian bookworm: libmodule-install-readmefrompod-perl 0.30-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libmodule-install-readmefrompod-perl 0.30-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libmodule-install-readmefrompod-perl 0.30-4 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu questing: libmodule-install-readmefrompod-perl 0.30-4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms