| 1 | package Pod::Weaver::PluginBundle::Author::GETTY; | ||
| 2 | # ABSTRACT: GETTY's default Pod::Weaver config | ||
| 3 | 6 | our $VERSION = '0.328'; | |
| 4 | 6 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 6 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | |||
| 7 | |||
| 8 | 6 | ▶ | use Pod::Weaver::Config::Assembler; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | 1717 | ▶ | sub _exp { Pod::Weaver::Config::Assembler->expand_package($_[0]) } |
|
Subroutine
_exp: called CC=1 SCAR=0.0
| |||
| 10 | |||
| 11 | 101 | ▶ | sub mvp_bundle_config { |
|
Subroutine
mvp_bundle_config: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 12 | 101 | my @plugins; | |
| 13 | 101 | push @plugins, ( | |
| 14 | [ '@GETTY/CorePrep', _exp('@CorePrep'), {} ], | ||
| 15 | [ '@GETTY/SingleEncoding', _exp('-SingleEncoding'), {} ], | ||
| 16 | [ '@GETTY/Name', _exp('Name'), {} ], | ||
| 17 | [ '@GETTY/Version', _exp('Version'), {} ], | ||
| 18 | |||
| 19 | [ '@GETTY/Prelude', _exp('Region'), { region_name => 'prelude' } ], | ||
| 20 | [ '@GETTY/Synopsis', _exp('Generic'), { header => 'SYNOPSIS' } ], | ||
| 21 | [ '@GETTY/Description', _exp('Generic'), { header => 'DESCRIPTION' } ], | ||
| 22 | [ '@GETTY/Overview', _exp('Generic'), { header => 'OVERVIEW' } ], | ||
| 23 | [ '@GETTY/Stability', _exp('Generic'), { header => 'STABILITY' } ], | ||
| 24 | ); | ||
| 25 | |||
| 26 | 101 | my $support_template = <<'END_TEMPLATE'; | |
| 27 | {{ | ||
| 28 | my @parts; | ||
| 29 | |||
| 30 | # Issue tracker first | ||
| 31 | if ($bugtracker_web) { | ||
| 32 | push @parts, "=head2 Issues\n\nPlease report bugs and feature requests at\nL<$bugtracker_web>."; | ||
| 33 | } | ||
| 34 | |||
| 35 | # IRC support | ||
| 36 | my $irc_user = $distmeta->{resources}{x_IRC_user}; | ||
| 37 | my $irc_url = $distmeta->{resources}{x_IRC}; | ||
| 38 | if ($irc_url) { | ||
| 39 | # Extract channel and server from irc:// URL | ||
| 40 | my ($server, $channel) = $irc_url =~ m{irc://([^/]+)/(.+)$}; | ||
| 41 | $server ||= 'irc.perl.org'; | ||
| 42 | if ($irc_user) { | ||
| 43 | push @parts, "=head2 IRC\n\nJoin C<$channel> on C<$server> or message $irc_user directly."; | ||
| 44 | } else { | ||
| 45 | push @parts, "=head2 IRC\n\nJoin C<$channel> on C<$server> for questions and support."; | ||
| 46 | } | ||
| 47 | } elsif ($irc_user) { | ||
| 48 | push @parts, "=head2 IRC\n\nYou can reach $irc_user on C<irc.perl.org> for questions and support."; | ||
| 49 | } | ||
| 50 | |||
| 51 | join "\n\n", @parts; | ||
| 52 | }} | ||
| 53 | END_TEMPLATE | ||
| 54 | |||
| 55 | 101 | push @plugins, ( | |
| 56 | [ '@GETTY/Leftovers', _exp('Leftovers'), {} ], | ||
| 57 | [ '@GETTY/postlude', _exp('Region'), { region_name => 'postlude' } ], | ||
| 58 | [ '@GETTY/Support', _exp('Author::GETTY::Support'), { | ||
| 59 | title => 'SUPPORT', | ||
| 60 | is_template => 1, | ||
| 61 | text => $support_template, | ||
| 62 | } ], | ||
| 63 | [ '@GETTY/Contributing', _exp('GenerateSection'), { | ||
| 64 | title => 'CONTRIBUTING', | ||
| 65 | is_template => 0, | ||
| 66 | text => 'Contributions are welcome! Please fork the repository and submit a pull request.', | ||
| 67 | } ], | ||
| 68 | [ '@GETTY/Authors', _exp('Authors'), {} ], | ||
| 69 | [ '@GETTY/Legal', _exp('Author::GETTY::Legal'), {} ], | ||
| 70 | [ '@GETTY/List', _exp('-Transformer'), { 'transformer' => 'List' } ], | ||
| 71 | [ '@GETTY/GETTY', _exp('-Transformer'), { 'transformer' => 'Author::GETTY' } ], | ||
| 72 | ); | ||
| 73 | |||
| 74 | 101 | return @plugins; | |
| 75 | } | ||
| 76 | |||
| 77 | 6 | 1; | |
| 78 | |||
| 79 | __END__ | ||