Dist::Z...yFromPod(3)

πŸ“¦
version 0.163250 Β· 2 versions
, in fedora 43

πŸ’– Dist::Zilla::Plugin::ReadmeAnyFromPod πŸ’–

okay bestie, gather round, because this is Dist::Zilla::Plugin::ReadmeAnyFromPod β€” yes, the manual page is filed under Dist::Z...yFromPod(3) in the User Contributed Perl Documentation, and we're about to make POD-to-README conversion your new personality. πŸ¦‹


✨ NAME ✨

Dist::Zilla::Plugin::ReadmeAnyFromPod β€” Automatically convert POD to a README in any format for Dist::Zilla. no cap, that's the whole job and it eats. πŸ’…


🌸 VERSION 🌸

version 0.163250


πŸŽ€ SYNOPSIS πŸŽ€

In your dist.ini, bestie:

[ReadmeAnyFromPod]
; Default is plaintext README in build dir

; Using non-default options: POD format with custom filename in
; dist root, outside of build. Including this README in version
; control makes Github happy.
[ReadmeAnyFromPod / ReadmePodInRoot]
type = pod
filename = README.pod
location = root

; Using plugin name autodetection: Produces README.html in root
[ ReadmeAnyFromPod / HtmlInRoot ]

like, look at those three little blocks. one default, one doing the absolute most with custom options, one just vibing off autodetection. iconic behavior fr fr. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

It generates a README for your Dist::Zilla powered dist from its "main_module", in any of several formats. The generated README can be included in the build, or created in the root of your dist for e.g. inclusion into version control. so you get to choose: tucked into the build, or out in the root living its main character life. πŸ‘‘

πŸ” PLUGIN NAME AUTODETECTION πŸ”

If you give the plugin an appropriate name (a string after the slash) in your dist.ini, it will can parse the "type" and "location" attributes from it. (yes, "it will can", we don't fix the source text, we respect the source text 🫢). The format is "Readme[TYPE]In[LOCATION]". The words "Readme" and "In" are optional, and the whole name is case-insensitive. The SYNOPSIS section above gives one example.

When run with "location = dist", this plugin runs in the "FileMunger" phase to create the new file. If it runs before another "FileMunger" plugin does, that happens to modify the input pod (like, say, "[PodWeaver]"), the README file contents will be recalculated, along with a warning that you should modify your dist.ini by referencing "[ReadmeAnyFromPod]" lower down in the file (the build still works, but is less efficient).

translation: order matters, and the plugin will tell you to move it down the file. it's not mad, just disappointed. 😭

πŸ’… ATTRIBUTES πŸ’…

🌈 type 🌈

The file format for the readme. Supported types are "text", "markdown", "gfm" (Github-flavored markdown), "pod", and "html". Note that you are not advised to create a .pod file in the dist itself, as ExtUtils::MakeMaker will install that, both into "PERL5LIB" and "MAN3DIR". so like, you can, but bestie, don't. πŸ’€

🌈 filename 🌈

The file name of the README file to produce. The default depends on the selected format.

🌈 source_filename 🌈

The file from which to extract POD for the content of the README. The default is the file of the main module of the dist. If the main module has a companion ".pod" file with the same basename, that is used as the default instead.

🌈 location 🌈

Where to put the generated README file. Choices are:

  • build β€” This puts the README in the directory where the dist is currently being built, where it will be incorporated into the dist.
  • root β€” This puts the README in the root directory (the same directory that contains dist.ini). The README will not be incorporated into the built dist.

If you want to generate the same README file in both the build directory and the root directory, simply generate it in the build directory and use the "[CopyFilesFromBuild]" plugin to copy it to the dist root. two READMEs, zero extra effort, we love a copy-paste shortcut. 🫢

🌈 phase 🌈

At what phase to generate the README file. Choices are:

  • build β€” (Default) This generates the README at 'after build' time. A new README will be generated each time you build the dist.
  • release β€” This generates the README at 'after release' time. Note that this is too late to get the file into the generated tarball, and is therefore incompatible with "location = build". However, this is ideal if you are using "location = root" and only want to update the README upon each release of your module.
heads up: phase = release + location = build = 🚫 not compatible, because the tarball already left the chat.

⭐ METHODS ⭐

🧚 gather_files 🧚

We create the file early, so other plugins that need to have the full list of files are aware of what we will be generating.

🧚 prune_files 🧚

Files with "location = root" must also be pruned, so that they don't sneak into the next build by virtue of already existing in the root dir. (The alternative is that the user doesn't add them to the build in the first place, with an option to their "GatherDir" plugin.) sneaky little files, we see you. πŸ™ˆ

🧚 munge_files 🧚

🧚 munge_file 🧚

Edits the content into the requested README file in the dist.

🧚 after_build 🧚

Create the requested README file at build time, if requested.

🧚 after_release 🧚

Create the requested README file at release time, if requested.

🧚 get_readme_content 🧚

Get the content of the README in the desired format.


πŸ’€ BUGS AND LIMITATIONS πŸ’€

Please report any bugs or feature requests to "rct+perlbug@thompsonclan.org". they want your bug reports, it's giving supportive. 🌸


πŸ‘‘ SEE ALSO πŸ‘‘

  • Dist::Zilla::Plugin::ReadmeFromPod β€” The base for this module
  • Dist::Zilla::Plugin::ReadmeMarkdownFromPod β€” Functionality subsumed by this module
  • Dist::Zilla::Plugin::CopyReadmeFromBuild β€” Functionality partly subsumed by this module

πŸ“ INSTALLATION πŸ“

See perlmodinstall for information and options on installing Perl modules.


✨ AUTHORS ✨

  • Ryan C. Thompson <rct@thompsonclan.org>
  • Karen Etheridge <ether@cpan.org>

This software is copyright (c) 2016 by Ryan C. Thompson.

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


πŸ”₯ DISCLAIMER OF WARRANTY πŸ”₯

okay this next part is legally required to be in all caps and honestly? it's giving screaming into the void, but we respect it. here it is, exactly as the law demands:

BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION.

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.


and that's the whole page, bestie!! πŸŽ€ this was perl v5.42.0, dated 2025-07-25, and you just read Dist::Z...yFromPod(3). go forth and generate READMEs in every format you desire. slay. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from