Dist-Zilla-Plugin-UsefulReadme

 view release on metacpan or  search on metacpan

README.md  view on Meta::CPAN


```
[UsefulReadme]
type     = markdown
filename = README.md
phase    = build
location = build
section = name
section = synopsis
section = description
section = requirements
section = installation
section = bugs
section = source
section = author
section = copyright and license
section = see also
```

# DESCRIPTION

dist.ini  view on Meta::CPAN

[UploadToCPAN]

[RecommendedPrereqs]
[AutoPrereqs]
skip = ^Dist::Zilla::File
skip = ^Dist::Zilla::Role
skip = ^Pod::Elemental::

[Prereqs / BuildRequires ]
-phase = build
-relationship = requires
ExtUtils::MakeMaker = 7.22
Module::Metadata = 1.000015

[Prereqs / DevelopRequires ]
-phase = develop
-relationship = requires

[Prereqs / TestRequires ]
-phase = test
-relationship = requires
Pod::Weaver = 4.016

[Prereqs / RuntimeRequires ]
-phase = runtime
-relationship = requires
Pod::Simple = 3.23

; [EnsurePrereqsInstalled]
; :version = 0.003
; type = requires
; type = recommends

[SecurityPolicy]
; authordep Software::Security::Policy::Individual
-policy = Individual
-policy_version = 0.10
timeframe = two weeks
git_url = https://github.com/robrwo/perl-Dist-Zilla-Plugin-UsefulReadme
report_url = https://github.com/robrwo/perl-Dist-Zilla-Plugin-UsefulReadme/security/advisories

lib/Dist/Zilla/Plugin/UsefulReadme.pm  view on Meta::CPAN

In the F<dist.ini>

    [UsefulReadme]
    type     = markdown
    filename = README.md
    phase    = build
    location = build
    section = name
    section = synopsis
    section = description
    section = requirements
    section = installation
    section = bugs
    section = source
    section = author
    section = copyright and license
    section = see also

=head1 DESCRIPTION

This is a L<Dist::Zilla> plugin to filter the main module POD to generate a F<README> file.  It allows developers to

lib/Dist/Zilla/Plugin/UsefulReadme.pm  view on Meta::CPAN

It can be specified multiple times using the C<section> option.

This can either be a case-insensitive string, or a regex that implicitly matches the entire heading, surrounded by slashes.

The default is equivalent to specifying

    section = name
    section = synopsis
    section = description
    section = recent changes
    section = requirements
    section = installation
    section = /support|bugs/
    section = source
    section = /authors?/
    section = /contributors?/
    section = /copyright|license|copyright and license/
    section = see also

The C<version>, C<requirements>, C<installation> and C<recent changes> sections are special.
If they do not exist in the module POD, then default values will be used for them unless L</section_fallback> is false.

t/11-pod-weaver-section-requirements.t  view on Meta::CPAN


use Path::Tiny qw( path );

my $ini = simple_ini( ['AutoPrereqs'], ['GatherDir'], ['MakeMaker'] );
$ini .= << "SAMPLE";
[MetaJSON]

[UsefulReadme]
type = pod
section = name
section = requirements

[PodWeaver]
[%PodWeaver]
Requirements.metafile = META.json
Requirements.region   = :readmefoo
SAMPLE

my $tzil = Builder->from_config(
    { dist_root => 'does-not-exist' },
    {

t/21-pod-weaver-section-requirements.t  view on Meta::CPAN


my $ini = simple_ini( ['AutoPrereqs'], ['GatherDir'], ['MakeMaker'] );
$ini .= << "SAMPLE";
[MetaJSON]

[PodWeaver]

[UsefulReadme]
type = pod
section = name
section = requirements

SAMPLE

my $tzil = Builder->from_config(
    { dist_root => 'does-not-exist' },
    {
        add_files => {
           path(qw( source dist.ini )) => $ini,
           path(qw( source weaver.ini )) => << 'WEAVER',
[@CorePrep]



( run in 0.889 second using v1.01-cache-2.11-cpan-beeb90c9504 )