NAME

Pod::From::Acme::CPANModules - Generate POD from an Acme::CPANModules::* module

VERSION

This document describes version 0.012 of Pod::From::Acme::CPANModules (from Perl distribution Pod-From-Acme-CPANModules), released on 2022-01-15.

SYNOPSIS

use Pod::From::Acme::CPANModules qw(gen_pod_from_acme_cpanmodules);

my $res = gen_pod_from_acme_cpanmodules(module => 'Acme::CPANModules::PERLANCAR::Favorites');

FUNCTIONS

gen_pod_from_acme_cpanmodules

Usage:

gen_pod_from_acme_cpanmodules(%args) -> any

Generate POD from an Acme::CPANModules::* module.

Currently what this routine does:

  • Fill the Description section from the CPANModules' list description

  • Add an "Acme::CPANModules Entries" section, containing the CPANModules' list entries

  • Add an "Acme::CPANModules Feature Comparison Matrix" section, if one or more entries have 'features'

This function is not exported by default, but exportable.

Arguments ('*' denotes required arguments):

  • additional_props => array[str]

    This lets you include additional properties (or attributes) from the entry defhash to the POD. This option will not be used if you completely customize the entry POD output using the entry_description_code option. This option is an alternative when you want to display some additional properties/attributes in the entry as POD but does not want to completely customize the POD yourself.

    The element of this option is property/attribute name, optionally followed by ":..." suffix to set the caption to show it with, then optionally followed by formatting suffix:

    • ":url" to render it as a link (L<...>)

    • ":mono" suffix to render it in monospace characters (C<...>)

    • ":quoted" (the default) to render it normally but quote it first using String::PodQuote

    • ":perl:..." to let a Perl code format it.

    Example:

    # option
    additional_props => [
        q(ruby_package:Ruby project's gem:perl:"https://rubygems.org/gems/$_[0]"),
        "ruby_website_url:Ruby project's website:url",
    ],

    with this entry:

    {
        module => "Valiant",
        ruby_package => "rails",
        ruby_website_url => "https://rubyonrails.org",
    }

    the additional POD produced will be something like:

    Ruby project's gem: LL<https://rubygems.org/gems/rails>
    
    Ruby project's website: LL<https://rubyonrails.org>

    See also the entry_description_code option.

  • entry_description_code => code

    This lets you completely customize the description POD for each entry, using Perl code. The Perl code will receive the entry hashref as its argument and is expected to produce a POD string.

    See also the additional_props option.

  • list => hash

    As an alternative to `module`, you can directly supply $LIST here.

  • module => str

Return value: (any)

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/Pod-From-Acme-CPANModules.

SOURCE

Source repository is at https://github.com/perlancar/perl-Pod-From-Acme-CPANModules.

AUTHOR

perlancar <perlancar@cpan.org>

CONTRIBUTING

To contribute, you can send patches by email/via RT, or send pull requests on GitHub.

Most of the time, you don't need to build the distribution yourself. You can simply modify the code, then test via:

% prove -l

If you want to build the distribution (e.g. to try to install it locally on your system), you can install Dist::Zilla, Dist::Zilla::PluginBundle::Author::PERLANCAR, and sometimes one or two other Dist::Zilla plugin and/or Pod::Weaver::Plugin. Any additional steps required beyond that are considered a bug and can be reported to me.

COPYRIGHT AND LICENSE

This software is copyright (c) 2022, 2021, 2020, 2019, 2018 by perlancar <perlancar@cpan.org>.

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

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Pod-From-Acme-CPANModules

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.