| 1 | package Sort::Sub::pod_section_ala_perlancar; | ||
| 2 | |||
| 3 | 1 | ▶ | use 5.010001; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |
| 8 | 1 | our $DATE = '2024-01-08'; # DATE | |
| 9 | 1 | our $DIST = 'Sort-SubBundle-PERLANCAR'; # DIST | |
| 10 | 1 | our $VERSION = '0.093'; # VERSION | |
| 11 | |||
| 12 | our $SORT_SPEC = [ | ||
| 13 | # ORIGINAL XXX are for forked modules, where the ORIGINAL XXX sections are | ||
| 14 | # the sections from the original (forked) module, and the XXX sections are | ||
| 15 | # for the new module (the fork). | ||
| 16 | |||
| 17 | |||
| 18 | # preamble | ||
| 19 | 'NAME', | ||
| 20 | 'SPECIFICATION VERSION', | ||
| 21 | 'VERSION', | ||
| 22 | 'DEPRECATION NOTICE', | ||
| 23 | 'SAH SCHEMAS', 'SAH SCHEMA DEFINITION', # Sah::Schema::*, Sah::Schemas::* | ||
| 24 | 'SYNOPSIS', 'ORIGINAL SYNOPSIS', | ||
| 25 | |||
| 26 | |||
| 27 | # main content | ||
| 28 | 'DESCRIPTION', 'ORIGINAL DESCRIPTION', | ||
| 29 | |||
| 30 | |||
| 31 | # Acme::CPANModules::* | ||
| 32 | "ACME::CPANMODULES ENTRIES", | ||
| 33 | "ACME::CPANMODULES FEATURE COMPARISON MATRIX", | ||
| 34 | |||
| 35 | |||
| 36 | # Bencher::Scenario::* | ||
| 37 | 'BENCHMARKED MODULES', | ||
| 38 | 'BENCHMARK PARTICIPANTS', | ||
| 39 | 'BENCHMARK DATASETS', | ||
| 40 | 'SAMPLE BENCHMARK RESULTS', | ||
| 41 | |||
| 42 | |||
| 43 | # everything else that are uncategorized go here | ||
| 44 | 0 | ▶ | sub { 1 }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 45 | |||
| 46 | |||
| 47 | # reference section | ||
| 48 | 1 | 'FUNCTIONS', | |
| 49 | 'ATTRIBUTES', | ||
| 50 | 'METHODS', | ||
| 51 | |||
| 52 | |||
| 53 | # reference section (CLI) | ||
| 54 | 'SUBCOMMANDS', | ||
| 55 | 'OPTIONS', | ||
| 56 | |||
| 57 | |||
| 58 | # from bsd | ||
| 59 | 'IMPLEMENTATION NOTES', | ||
| 60 | |||
| 61 | |||
| 62 | # other content (CLI) | ||
| 63 | 'COMPLETION', | ||
| 64 | |||
| 65 | |||
| 66 | # FAQ (after all content & references) | ||
| 67 | 'FAQ', 'ORIGINAL FAQ', | ||
| 68 | 'FAQS', 'ORIGINAL FAQS', | ||
| 69 | |||
| 70 | |||
| 71 | # links/pointers (CLI) | ||
| 72 | 'CONFIGURATION FILE', | ||
| 73 | 'CONFIGURATION FILES', | ||
| 74 | 'ENVIRONMENT', | ||
| 75 | 'ENVIRONMENT VARIABLES', | ||
| 76 | 'FILES', | ||
| 77 | |||
| 78 | |||
| 79 | # exit status, diagnostics, errors. from bsd | ||
| 80 | 'EXIT STATUS', | ||
| 81 | 'DIAGNOSTICS', | ||
| 82 | # RETURN VALUE # for syscall | ||
| 83 | # ERRORS # for syscall | ||
| 84 | |||
| 85 | |||
| 86 | # examples, from bsd | ||
| 87 | 'EXAMPLES', | ||
| 88 | |||
| 89 | |||
| 90 | # todos | ||
| 91 | 'TODO', 'ORIGINAL TODO', | ||
| 92 | 'TODOS', 'ORIGINAL TODOS', | ||
| 93 | |||
| 94 | |||
| 95 | # links | ||
| 96 | 'HOMEPAGE', 'ORIGINAL HOMEPAGE', | ||
| 97 | 'SOURCE', 'ORIGINAL SOURCE', | ||
| 98 | 'SEE ALSO', 'ORIGINAL SEE ALSO', | ||
| 99 | |||
| 100 | |||
| 101 | # standards, from bsd | ||
| 102 | 'STANDARDS', | ||
| 103 | |||
| 104 | |||
| 105 | # history | ||
| 106 | 'HISTORY', 'ORIGINAL HISTORY', | ||
| 107 | |||
| 108 | |||
| 109 | # credits, authors, contributors, & copyright | ||
| 110 | 'CREDITS', 'ORIGINAL CREDITS', | ||
| 111 | 'THANKS', 'ORIGINAL THANKS', | ||
| 112 | |||
| 113 | qr/^AUTHORS?/, | ||
| 114 | qr/^ORIGINAL AUTHORS?/, | ||
| 115 | |||
| 116 | 'CONTRIBUTOR', 'CONTRIBUTORS', | ||
| 117 | |||
| 118 | 'CONTRIBUTING', | ||
| 119 | |||
| 120 | 'COPYRIGHT AND LICENSE', 'ORIGINAL COPYRIGHT AND LICENSE', | ||
| 121 | 'COPYRIGHT & LICENSE', 'ORIGINAL COPYRIGHT & LICENSE', | ||
| 122 | 'COPYRIGHT', 'ORIGINAL COPYRIGHT', | ||
| 123 | 'LICENSE', 'ORIGINAL LICENSE', | ||
| 124 | |||
| 125 | |||
| 126 | # bugs/caveats | ||
| 127 | 'BUGS', 'ORIGINAL BUGS', | ||
| 128 | 'GOTCHAS', | ||
| 129 | 'CAVEATS', | ||
| 130 | ]; | ||
| 131 | |||
| 132 | 0 | ▶ | sub meta { |
|
Subroutine
meta: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 133 | return { | ||
| 134 | 0 | v => 1, | |
| 135 | summary => 'Sort POD sections (headings) PERLANCAR-style', | ||
| 136 | }; | ||
| 137 | } | ||
| 138 | |||
| 139 | 0 | ▶ | sub gen_sorter { |
|
Subroutine
gen_sorter: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 140 | 0 | require Sort::BySpec; | |
| 141 | |||
| 142 | 0 | my ($is_reverse, $is_ci) = @_; | |
| 143 | |||
| 144 | 0 | Sort::BySpec::cmp_by_spec( | |
| 145 | spec => $SORT_SPEC, | ||
| 146 | reverse => $is_reverse, | ||
| 147 | ); | ||
| 148 | } | ||
| 149 | |||
| 150 | 1 | 1; | |
| 151 | # ABSTRACT: Sort POD sections (headings) PERLANCAR-style | ||
| 152 | |||
| 153 | __END__ | ||