Pod::Weaver::Role::SortSections - Sort POD sections
This document describes version 0.02 of Pod::Weaver::Role::SortSections (from Perl distribution Pod-Weaver-Role-SortSections), released on 2016-01-17.
In your Pod::Weaver plugin:
$self->sort_sections($document, [ 'NAME', 'VERSION', 'DESCRIPTION', qr/.+/, # put everything else here 'AUTHOR', 'COPYRIGHT AND LICENSE', 'COPYRIGHT', # sometimes C&L is separated 'LICENSE', # sometimes C&L is separated 'SEE ALSO', ]);
As we add sections to document using various plugins or section modules, sometimes in different orders, the result is that the order of sections might not be like we want. This role provides a sort_sections() to rectify that. This should be done after all section adding.
sort_sections()
Sort POD sections. $spec is a list of section names or regexes as specified in Sort::BySpec.
$spec
Please visit the project's homepage at https://metacpan.org/release/Pod-Weaver-Role-SortSections.
Source repository is at https://github.com/perlancar/perl-Pod-Weaver-Role-SortSections.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=Pod-Weaver-Role-SortSections
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.
Sort::BySpec
perlancar <perlancar@cpan.org>
This software is copyright (c) 2016 by 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.
To install Pod::Weaver::Role::SortSections, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::Weaver::Role::SortSections
CPAN shell
perl -MCPAN -e shell install Pod::Weaver::Role::SortSections
For more information on module installation, please visit the detailed CPAN module installation guide.