| 1 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 2 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | package Pod::Weaver::PluginBundle::Author::TABULO; | ||||||||||
| 6 | 2 | our $VERSION = '1.000014'; | |||||||||
| 7 | |||||||||||
| 8 | 2 | ▶ | use Pod::Weaver 4; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 2 | ▶ | use Pod::Weaver::Config::Assembler; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | # Dependencies | ||||||||||
| 12 | 2 | ▶ | use Pod::Elemental::Transformer::List 0.102000 (); # - transform :list regions into =over/=back to save typing | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 2 | ▶ | use Pod::Elemental::PerlMunger 0.200001 (); # - replace with comment support | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | 2 | ▶ | use Pod::Weaver::Plugin::AppendPrepend (); # - Merge append:FOO and prepend:FOO sections in POD | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | 2 | ▶ | use Pod::Weaver::Plugin::Include (); # - Support for including sections of Pod from other files | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | 2 | ▶ | use Pod::Weaver::Plugin::StopWords (); # - Dynamically add stopwords to your woven pod | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 18 | 2 | ▶ | use Pod::Weaver::Plugin::WikiDoc (); # - allow wikidoc-format regions to be translated during dialect phase | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 19 | |||||||||||
| 20 | 2 | ▶ | use Pod::Weaver::Section::Authors (); # - Add or replace an AUTHOR or AUTHORS section; similar to Pod::Weaver::Section::Authors | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 21 | 2 | ▶ | use Pod::Weaver::Section::ClassMopper (); # - Use Class::MOP introspection to make a couple sections. | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | 2 | ▶ | use Pod::Weaver::Section::Collect (); # - a section that gathers up specific commands | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | 2 | ▶ | use Pod::Weaver::Section::Contributors 0.008 (); # - a section listing contributors | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 24 | 2 | ▶ | use Pod::Weaver::Section::ReplaceName (); # - Add or replace a NAME section with abstract. | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 25 | 2 | ▶ | use Pod::Weaver::Section::SeeAlso (); # - add a SEE ALSO pod section | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 26 | 2 | ▶ | use Pod::Weaver::Section::Support 1.001 (); # - Add a SUPPORT section to your POD | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 27 | |||||||||||
| 28 | |||||||||||
| 29 | ## Roles / Classes | ||||||||||
| 30 | # use Pod::Weaver::Section::Requires (); # - Add Pod::Weaver section with all used modules from package excluding listed ones | ||||||||||
| 31 | # use Pod::Weaver::Section::Consumes (); # - Add a list of roles to your POD. | ||||||||||
| 32 | # use Pod::Weaver::Section::Extends (); # - Add a list of parent classes to your POD. | ||||||||||
| 33 | |||||||||||
| 34 | ## Add or Replace BOILERPLATE | ||||||||||
| 35 | # use Pod::Weaver::Section::ReplaceName(); # - Add or replace a NAME section with abstract. | ||||||||||
| 36 | # use Pod::Weaver::Section::ReplaceAuthors (); # - Add or replace an AUTHOR or AUTHORS section; similar to Pod::Weaver::Section::Authors | ||||||||||
| 37 | # use Pod::Weaver::Section::ReplaceLegal(); # - Add or replace a COPYRIGHT AND LICENSE section. | ||||||||||
| 38 | # use Pod::Weaver::Section::ReplaceVersion(); # - Add or replace a VERSION section. | ||||||||||
| 39 | |||||||||||
| 40 | ## Buildn se | ||||||||||
| 41 | # use Pod::Weaver::Section::Collect::FromOther (); # - Import sections from other POD | ||||||||||
| 42 | # use Pod::Weaver::Section::CollectWithAutoDoc (); # - Section to gather specific commands and add auto-generated documentation via Sub::Documentation. | ||||||||||
| 43 | # use Pod::Weaver::Section::CollectWithIntro (); # - Preface pod collections; allows one to attach a prefix paragraph to the collected section/node. | ||||||||||
| 44 | # use Pod::Weaver::Section::CommentString (); # - Add Pod::Weaver section with content extracted from comment with a keyword (like ABSTRACT for Name) | ||||||||||
| 45 | # use Pod::Weaver::Section::Template (); # - add pod section from a Text::Template template | ||||||||||
| 46 | |||||||||||
| 47 | # use Pod::Weaver::Section::SourceGitHub(); # - Add SOURCE pod section for a github repository | ||||||||||
| 48 | # use Pod::Weaver::Section::WarrantyDisclaimer(); # - Add a standard DISCLAIMER OF WARRANTY section (for your Perl module) | ||||||||||
| 49 | |||||||||||
| 50 | # use Sub::Documentation; | ||||||||||
| 51 | # use Sub::Documentation::Attributes; | ||||||||||
| 52 | |||||||||||
| 53 | |||||||||||
| 54 | |||||||||||
| 55 | |||||||||||
| 56 | 42 | ▶ | sub _exp { Pod::Weaver::Config::Assembler->expand_package( $_[0] ) } | ||||||||
|
Subroutine
_exp: called CC=1 SCAR=0.0
| |||||||||||
| 57 | |||||||||||
| 58 | 2 | my $repo_intro = <<'END'; | |||||||||
| 59 | This is open source software. The code repository is available for | ||||||||||
| 60 | public review and contribution under the terms of the license. | ||||||||||
| 61 | END | ||||||||||
| 62 | |||||||||||
| 63 | 2 | my $bugtracker_content = <<'END'; | |||||||||
| 64 | Please report any bugs or feature requests through the issue tracker | ||||||||||
| 65 | at {WEB}. | ||||||||||
| 66 | END | ||||||||||
| 67 | |||||||||||
| 68 | |||||||||||
| 69 | 1 | ▶ | sub mvp_bundle_config { | ||||||||
|
Subroutine
mvp_bundle_config: called CC=4 SCAR=14.0
Pod
undocumented
| |||||||||||
| 70 | |||||||||||
| 71 | 1 | my @plugins; | |||||||||
| 72 | 1 | push @plugins, ( | |||||||||
| 73 | [ "SingleEncoding", _exp('-SingleEncoding'), {} ], | ||||||||||
| 74 | [ "WikiDoc", _exp('-WikiDoc'), {} ], | ||||||||||
| 75 | [ "CorePrep", _exp('@CorePrep'), {} ], | ||||||||||
| 76 | |||||||||||
| 77 | [ "AppendPrepend", _exp('-AppendPrepend'), {} ], # - Merge append:FOO and prepend:FOO sections in POD | ||||||||||
| 78 | [ "Include", _exp('-Include'), {} ], # - Support for including sections of Pod from other files | ||||||||||
| 79 | [ "StopWords", _exp('-StopWords'), {} ], # - Dynamically add stopwords to your woven pod | ||||||||||
| 80 | ); | ||||||||||
| 81 | |||||||||||
| 82 | 1 | push @plugins, ( [ 'List' => _exp('-Transformer'), { transformer => 'List' } ], [ 'Verbatim' => _exp('-Transformer'), { transformer => 'Verbatim' } ], ); | |||||||||
| 83 | |||||||||||
| 84 | push @plugins, map { | ||||||||||
| 85 | 1 | ▶ | $_->[2]{header} = uc $_->[0] if @$_; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 86 | 34 | ▶ | @$_ ? $_ : () | ||||||||
|
Branch: 1 branch
| |||||||||||
| 87 | } ( | ||||||||||
| 88 | # Sections | ||||||||||
| 89 | [ "Name", _exp('ReplaceName'), {} ], | ||||||||||
| 90 | [ "Version", _exp('Version'), {} ], | ||||||||||
| 91 | [ "Prelude", _exp('Region'), { region_name => 'prelude' } ], | ||||||||||
| 92 | |||||||||||
| 93 | [ "Foreword", _exp('Generic'), {} ], | ||||||||||
| 94 | [ "Synopsis", _exp('Generic'), {} ], | ||||||||||
| 95 | [ "Description", _exp('Generic'), {} ], | ||||||||||
| 96 | [ "Usage", _exp('Generic'), {} ], | ||||||||||
| 97 | [ "Overview", _exp('Generic'), {} ], | ||||||||||
| 98 | [ "Stability", _exp('Generic'), {} ], | ||||||||||
| 99 | |||||||||||
| 100 | [ 'Requirements', _exp('Collect'), { command => 'requires' } ], | ||||||||||
| 101 | |||||||||||
| 102 | ## ClassMopper generates one or two sections (ATTRIBUTES / METHODS) from Class::MOP metadata. | ||||||||||
| 103 | ## BUT... looks kinda horrible, like JavaDoc :-( | ||||||||||
| 104 | [ 'Attributes', _exp('ClassMopper'), { no_tagline => 1, skip_methods=>1, skip_attributes => 0 } ], | ||||||||||
| 105 | [ 'Attributes*', _exp('Collect'), { command => 'attr' } ], # name != Attributes (since ClassMopper generates that) | ||||||||||
| 106 | [ 'Attributes (Class)', _exp('Collect'), { command => 'cattr' } ], | ||||||||||
| 107 | [ 'Attributes (Private)', _exp('Collect'), { command => 'pattr' } ], | ||||||||||
| 108 | |||||||||||
| 109 | [ 'Constructors', _exp('Collect'), { command => 'constructor' } ], | ||||||||||
| 110 | [ 'Methods', _exp('Collect'), { command => 'method' } ], | ||||||||||
| 111 | [ 'Methods (Class)', _exp('Collect'), { command => 'cmethod' } ], | ||||||||||
| 112 | [ 'Methods (Object)', _exp('Collect'), { command => 'omethod' } ], | ||||||||||
| 113 | [ 'Singletons', _exp('Collect'), { command => 'singleton' } ], | ||||||||||
| 114 | |||||||||||
| 115 | [ 'Functions', _exp('Collect'), { command => 'func' } ], | ||||||||||
| 116 | |||||||||||
| 117 | [ 'Commands', _exp('Collect'), { command => 'cmd' } ], | ||||||||||
| 118 | [ 'Options', _exp('Collect'), { command => 'opt' } ], | ||||||||||
| 119 | [ 'Tags', _exp('Collect'), { command => 'tag' } ], | ||||||||||
| 120 | |||||||||||
| 121 | [ 'Types', _exp('Collect'), { command => 'type' } ], | ||||||||||
| 122 | [ 'Constants', _exp('Collect'), { command => 'const' } ], | ||||||||||
| 123 | [ 'Variables', _exp('Collect'), { command => 'var' } ], | ||||||||||
| 124 | |||||||||||
| 125 | [ 'Caveats', _exp('Collect'), { command => 'caveat' } ], | ||||||||||
| 126 | [ 'See Also', _exp('Collect'), { command => 'see' } ], | ||||||||||
| 127 | |||||||||||
| 128 | [ "Leftovers" => _exp('Leftovers'), {} ], | ||||||||||
| 129 | [ "postlude" => _exp('Region'), { region_name => 'postlude' } ], | ||||||||||
| 130 | [ "Authors" => _exp('Authors'), {} ], | ||||||||||
| 131 | [ | ||||||||||
| 132 | "Support" => _exp('Support'), { | ||||||||||
| 133 | perldoc => 0, | ||||||||||
| 134 | websites => 'none', | ||||||||||
| 135 | bugs => 'metadata', | ||||||||||
| 136 | bugs_content => $bugtracker_content, | ||||||||||
| 137 | repository_link => 'both', | ||||||||||
| 138 | repository_content => $repo_intro | ||||||||||
| 139 | } | ||||||||||
| 140 | ], | ||||||||||
| 141 | [ 'Contributors' => _exp('Contributors'), { ':version' => '0.008' } ], | ||||||||||
| 142 | [ "Legal", _exp('Legal'), {} ], | ||||||||||
| 143 | |||||||||||
| 144 | ); | ||||||||||
| 145 | |||||||||||
| 146 | # [TAU]: Refactored prefixing down here. | ||||||||||
| 147 | 1 | $_->[0] = '@Author/TABULO/' . $_->[0] for (@plugins); | |||||||||
| 148 | |||||||||||
| 149 | 1 | return @plugins; | |||||||||
| 150 | } | ||||||||||
| 151 | |||||||||||
| 152 | 2 | 1; | |||||||||
| 153 | |||||||||||
| 154 | =pod | ||||||||||
| 155 | |||||||||||
| 156 | =encoding UTF-8 | ||||||||||
| 157 | |||||||||||
| 158 | =for :stopwords Tabulo[n] | ||||||||||
| 159 | |||||||||||
| 160 | =head1 NAME | ||||||||||
| 161 | |||||||||||
| 162 | Pod::Weaver::PluginBundle::Author::TABULO - TABULO's bundle for Pod::Weaver (providing a default config for his distros) | ||||||||||
| 163 | |||||||||||
| 164 | =head1 VERSION | ||||||||||
| 165 | |||||||||||
| 166 | version 1.000014 | ||||||||||
| 167 | |||||||||||
| 168 | =head1 FOREWORD | ||||||||||
| 169 | |||||||||||
| 170 | [TABULO]: This module started out as a copy of @DAGOLDEN's, including its documentation, copied and re-adapted below. | ||||||||||
| 171 | |||||||||||
| 172 | =head1 DESCRIPTION | ||||||||||
| 173 | |||||||||||
| 174 | This is a L<Pod::Weaver> PluginBundle. It is roughly equivalent to the | ||||||||||
| 175 | following weaver.ini: | ||||||||||
| 176 | |||||||||||
| 177 | [-WikiDoc] | ||||||||||
| 178 | |||||||||||
| 179 | [Generic / FOREWORD] | ||||||||||
| 180 | |||||||||||
| 181 | [@Default] | ||||||||||
| 182 | |||||||||||
| 183 | [Generic / USAGE] | ||||||||||
| 184 | [Generic / OVERVIEW] | ||||||||||
| 185 | [Generic / STABILITY] | ||||||||||
| 186 | |||||||||||
| 187 | [Collect / REQUIREMENTS] | ||||||||||
| 188 | command = requires | ||||||||||
| 189 | |||||||||||
| 190 | [Collect / CONSTRUCTORS] | ||||||||||
| 191 | command = constructor | ||||||||||
| 192 | |||||||||||
| 193 | [ClassMopper / ATTRIBUTES] | ||||||||||
| 194 | no_tagline = 1 | ||||||||||
| 195 | skip_methods = 1 | ||||||||||
| 196 | skip_attributes = 0 | ||||||||||
| 197 | |||||||||||
| 198 | [Support] | ||||||||||
| 199 | ... | ||||||||||
| 200 | |||||||||||
| 201 | [Contributors] | ||||||||||
| 202 | |||||||||||
| 203 | [-Transformer] | ||||||||||
| 204 | transformer = List | ||||||||||
| 205 | |||||||||||
| 206 | =head1 USAGE | ||||||||||
| 207 | |||||||||||
| 208 | This PluginBundle is used automatically with the C<@Author::TABULO> L<Dist::Zilla> | ||||||||||
| 209 | plugin bundle. | ||||||||||
| 210 | |||||||||||
| 211 | It also has region collectors for: | ||||||||||
| 212 | |||||||||||
| 213 | =over 4 | ||||||||||
| 214 | |||||||||||
| 215 | =item * | ||||||||||
| 216 | |||||||||||
| 217 | requires | ||||||||||
| 218 | |||||||||||
| 219 | =item * | ||||||||||
| 220 | |||||||||||
| 221 | constructor | ||||||||||
| 222 | |||||||||||
| 223 | =item * | ||||||||||
| 224 | |||||||||||
| 225 | attr | ||||||||||
| 226 | |||||||||||
| 227 | =item * | ||||||||||
| 228 | |||||||||||
| 229 | method | ||||||||||
| 230 | |||||||||||
| 231 | =item * | ||||||||||
| 232 | |||||||||||
| 233 | func | ||||||||||
| 234 | |||||||||||
| 235 | =back | ||||||||||
| 236 | |||||||||||
| 237 | =for Pod::Coverage mvp_bundle_config | ||||||||||
| 238 | |||||||||||
| 239 | =head1 SEE ALSO | ||||||||||
| 240 | |||||||||||
| 241 | =over 4 | ||||||||||
| 242 | |||||||||||
| 243 | =item * | ||||||||||
| 244 | |||||||||||
| 245 | L<Pod::Weaver::PluginBundle::DAGOLDEN> | ||||||||||
| 246 | |||||||||||
| 247 | =item * | ||||||||||
| 248 | |||||||||||
| 249 | L<Pod::Weaver> | ||||||||||
| 250 | |||||||||||
| 251 | =item * | ||||||||||
| 252 | |||||||||||
| 253 | L<Pod::Weaver::Plugin::WikiDoc> | ||||||||||
| 254 | |||||||||||
| 255 | =item * | ||||||||||
| 256 | |||||||||||
| 257 | L<Pod::Weaver::Plugin::ClassMopper> | ||||||||||
| 258 | |||||||||||
| 259 | =item * | ||||||||||
| 260 | |||||||||||
| 261 | L<Pod::Elemental::Transformer::List> | ||||||||||
| 262 | |||||||||||
| 263 | =item * | ||||||||||
| 264 | |||||||||||
| 265 | L<Pod::Weaver::Section::Contributors> | ||||||||||
| 266 | |||||||||||
| 267 | =item * | ||||||||||
| 268 | |||||||||||
| 269 | L<Pod::Weaver::Section::Support> | ||||||||||
| 270 | |||||||||||
| 271 | =item * | ||||||||||
| 272 | |||||||||||
| 273 | L<Dist::Zilla::Plugin::PodWeaver> | ||||||||||
| 274 | |||||||||||
| 275 | =back | ||||||||||
| 276 | |||||||||||
| 277 | =begin notes | ||||||||||
| 278 | |||||||||||
| 279 | |||||||||||
| 280 | |||||||||||
| 281 | |||||||||||
| 282 | =end notes | ||||||||||
| 283 | |||||||||||
| 284 | # Some PLUGIN possibilities (found on CPAN) include : | ||||||||||
| 285 | # | ||||||||||
| 286 | # Pod::Weaver::Section::* | ||||||||||
| 287 | # * AllowOverride - Allow POD to override a Pod::Weaver-provided | ||||||||||
| 288 | # * Collect::FromOther - Import sections from other POD | ||||||||||
| 289 | # * CommentString - Add Pod::Weaver section with content extracted from comment with specified key | ||||||||||
| 290 | # * Bugs::DefaultRT - Add a BUGS section to refer to bugtracker (or RT as default) | ||||||||||
| 291 | # * GenerateSection - add pod section from an interpolated piece of text | ||||||||||
| 292 | # * ReplaceName - Add or replace a NAME section with abstract. | ||||||||||
| 293 | # * SeeAlso - add a SEE ALSO pod section. Also supports #SEEALSO comments (preferable). | ||||||||||
| 294 | # WARNING: The 'SEE ALSO' section in your POD, if present, | ||||||||||
| 295 | # should just be a list of links (one per line), without any POD commands. | ||||||||||
| 296 | # * Template - add pod section from a Text::Template template | ||||||||||
| 297 | # * WarrantyDisclaimer - Add a standard DISCLAIMER OF WARRANTY section (for your Perl module) | ||||||||||
| 298 | # | ||||||||||
| 299 | # * Extends - Add a list of parent classes to your POD. | ||||||||||
| 300 | # * Consumes - Add a list of roles to your POD. WARNING: This one has some CAVEATS (refer to CPAN). | ||||||||||
| 301 | # * Requires - Add Pod::Weaver section with all used modules from package excluding listed ones, e.g. : | ||||||||||
| 302 | # [Requires] | ||||||||||
| 303 | # ignore = base lib constant namespace::sweep | ||||||||||
| 304 | # | ||||||||||
| 305 | # Pod::Weaver::Plugin::* | ||||||||||
| 306 | # .* AppendPrepend - Merge append:FOO and prepend:FOO sections in POD | ||||||||||
| 307 | # .* Include - Support for including sections of Pod from other files | ||||||||||
| 308 | # .* EnsureUniqueSections - Ensure that POD has no duplicate section headers. | ||||||||||
| 309 | # NOTE: Setting strict=1 will disable smart detection of duplicates (plural forms, collapsed space, ...) | ||||||||||
| 310 | # * Exec - include output of commands in your pod | ||||||||||
| 311 | # * Run - Write Pod::Weaver::Plugin directly in 'weaver.ini' | ||||||||||
| 312 | # WARNING: Seems to be a bit esoteric. | ||||||||||
| 313 | # * SortSections - Sort POD sections | ||||||||||
| 314 | # .* StopWords - Dynamically add stopwords to your woven pod. XXX: Staying away from this, as it adds lines on top of the module. | ||||||||||
| 315 | # .* WikiDoc - allow wikidoc-format regions to be translated during dialect phase | ||||||||||
| 316 | |||||||||||
| 317 | =head1 AUTHORS | ||||||||||
| 318 | |||||||||||
| 319 | Tabulo[n] <dev@tabulo.net> | ||||||||||
| 320 | |||||||||||
| 321 | =head1 LEGAL | ||||||||||
| 322 | |||||||||||
| 323 | This software is copyright (c) 2023 by Tabulo[n]. | ||||||||||
| 324 | |||||||||||
| 325 | This is free software; you can redistribute it and/or modify it under | ||||||||||
| 326 | the same terms as the Perl 5 programming language system itself. | ||||||||||
| 327 | |||||||||||
| 328 | =cut | ||||||||||
| 329 | |||||||||||
| 330 | __END__ | ||||||||||