| 1 | use strict; | ||
| 2 | package Pod::Weaver::PluginBundle::Author::MAXHQ; | ||
| 3 | # ABSTRACT: MAXHQ's default Pod::Weaver configuration | ||
| 4 | $Pod::Weaver::PluginBundle::Author::MAXHQ::VERSION = '3.3.3'; | ||
| 5 | # Thanks to | ||
| 6 | # - Joshua Keroes (http://rjbs.manxome.org/rubric/entry/1809) | ||
| 7 | # - rjbs (http://de.slideshare.net/jkeroes/getting-started-with-podweaver) | ||
| 8 | |||
| 9 | #pod =head1 SYNOPSIS | ||
| 10 | #pod | ||
| 11 | #pod Put the following into your C<weaver.ini>: | ||
| 12 | #pod | ||
| 13 | #pod [@Author::MAXHQ] | ||
| 14 | #pod | ||
| 15 | #pod =head1 OVERVIEW | ||
| 16 | #pod | ||
| 17 | #pod Currently this plugin bundle is equivalent to: | ||
| 18 | #pod | ||
| 19 | #pod [@CorePrep] | ||
| 20 | #pod | ||
| 21 | #pod [Name] | ||
| 22 | #pod [Version] | ||
| 23 | #pod | ||
| 24 | #pod ;# | ||
| 25 | #pod ;# prelude | ||
| 26 | #pod ;# | ||
| 27 | #pod [Region / prelude] | ||
| 28 | #pod | ||
| 29 | #pod [Generic / SYNOPSIS] | ||
| 30 | #pod [Generic / DESCRIPTION] | ||
| 31 | #pod [Generic / OVERVIEW] | ||
| 32 | #pod | ||
| 33 | #pod [Extends] | ||
| 34 | #pod | ||
| 35 | #pod ;# | ||
| 36 | #pod ;# functions etc. | ||
| 37 | #pod ;# | ||
| 38 | #pod [Collect / REX TASKS] | ||
| 39 | #pod command = rex_task | ||
| 40 | #pod | ||
| 41 | #pod [Collect / MOJOLICIOUS PLUGINS] | ||
| 42 | #pod command = mojo_plugin | ||
| 43 | #pod | ||
| 44 | #pod [Collect / MOJOLICIOUS SHORTCUTS] | ||
| 45 | #pod command = mojo_short | ||
| 46 | #pod | ||
| 47 | #pod [Collect / MOJOLICIOUS CONDITIONS] | ||
| 48 | #pod command = mojo_cond | ||
| 49 | #pod | ||
| 50 | #pod [Collect / MOJOLICIOUS HELPERS] | ||
| 51 | #pod command = mojo_helper | ||
| 52 | #pod | ||
| 53 | #pod [Collect / FUNCTIONS ] | ||
| 54 | #pod command = func | ||
| 55 | #pod | ||
| 56 | #pod [Collect / ATTRIBUTES] | ||
| 57 | #pod command = attr | ||
| 58 | #pod | ||
| 59 | #pod [Collect / METHODS REQUIRED BY THIS ROLE] | ||
| 60 | #pod command = requires | ||
| 61 | #pod | ||
| 62 | #pod [Collect / CLASS METHODS] | ||
| 63 | #pod command = class_method | ||
| 64 | #pod | ||
| 65 | #pod [Collect / METHODS] | ||
| 66 | #pod command = method | ||
| 67 | #pod | ||
| 68 | #pod | ||
| 69 | #pod [Leftovers] | ||
| 70 | #pod | ||
| 71 | #pod ;# | ||
| 72 | #pod ;# postlude | ||
| 73 | #pod ;# | ||
| 74 | #pod [Region / postlude] | ||
| 75 | #pod | ||
| 76 | #pod [Authors] | ||
| 77 | #pod [Legal] | ||
| 78 | #pod | ||
| 79 | #pod ;# | ||
| 80 | #pod ;# plugins | ||
| 81 | #pod ;# | ||
| 82 | #pod [-Transformer] | ||
| 83 | #pod transformer = List | ||
| 84 | #pod | ||
| 85 | #pod =cut | ||
| 86 | |||
| 87 | use Pod::Weaver::Config::Assembler; | ||
| 88 | sub _exp { Pod::Weaver::Config::Assembler->expand_package($_[0]) } | ||
| 89 | |||
| 90 | #pod =for Pod::Coverage mvp_bundle_config | ||
| 91 | #pod | ||
| 92 | #pod =cut | ||
| 93 | # | ||
| 94 | #Returns my C<Pod::Weaver> plugin configuration. Based on | ||
| 95 | #L<Pod::Weaver::PluginBundle::RJBS>. | ||
| 96 | # | ||
| 97 | #The return format is a list of ArrayRefs, where each ArrayRef looks like: | ||
| 98 | # | ||
| 99 | # [$name, $package, $payload] | ||
| 100 | # | ||
| 101 | #(Described in L<Config::MVP::Assembler::WithBundles/replace_bundle_with_contents>) | ||
| 102 | # | ||
| 103 | #This method is called by L<Pod::Weaver>, or more specific by | ||
| 104 | #L<Config::MVP::Assembler::WithBundles/replace_bundle_with_contents>. | ||
| 105 | sub mvp_bundle_config { | ||
| 106 | return ( | ||
| 107 | [ '@MAXHQ/CorePrep', _exp('@CorePrep'), {} ], | ||
| 108 | [ '@MAXHQ/Name', _exp('Name'), {} ], | ||
| 109 | [ '@MAXHQ/Version', _exp('Version'), {} ], | ||
| 110 | |||
| 111 | # Header | ||
| 112 | [ '@MAXHQ/Prelude', _exp('Region'), { region_name => 'prelude' } ], | ||
| 113 | |||
| 114 | [ '@MAXHQ/Synopsis', _exp('Generic'), { header => 'SYNOPSIS' } ], | ||
| 115 | [ '@MAXHQ/Description', _exp('Generic'), { header => 'DESCRIPTION' } ], | ||
| 116 | [ '@MAXHQ/Overview', _exp('Generic'), { header => 'OVERVIEW' } ], | ||
| 117 | |||
| 118 | # Rex specific | ||
| 119 | [ '@MAXHQ/RexTasks', _exp('Collect'), { command => 'rex_task', header => 'REX TASKS' } ], | ||
| 120 | |||
| 121 | # Mojolicious specific | ||
| 122 | [ '@MAXHQ/MojoPlugins', _exp('Collect'), { command => 'mojo_plugin', header => 'MOJOLICIOUS PLUGINS' } ], | ||
| 123 | [ '@MAXHQ/MojoShortcuts', _exp('Collect'), { command => 'mojo_short', header => 'MOJOLICIOUS SHORTCUTS' } ], | ||
| 124 | [ '@MAXHQ/MojoConditions', _exp('Collect'), { command => 'mojo_cond', header => 'MOJOLICIOUS CONDITIONS' } ], | ||
| 125 | [ '@MAXHQ/MojoHelpers', _exp('Collect'), { command => 'mojo_helper', header => 'MOJOLICIOUS HELPERS' } ], | ||
| 126 | |||
| 127 | # Functional code | ||
| 128 | [ '@MAXHQ/Functions', _exp('Collect'), { command => 'func', header => 'FUNCTIONS' } ], | ||
| 129 | |||
| 130 | # Object oriented code | ||
| 131 | [ '@MAXHQ/RoleRequires', _exp('Collect'), { command => 'requires', header => 'METHODS REQUIRED BY THIS ROLE' } ], | ||
| 132 | [ '@MAXHQ/Attributes', _exp('Collect'), { command => 'attr', header => 'ATTRIBUTES'} ], | ||
| 133 | [ '@MAXHQ/ClassMethods', _exp('Collect'), { command => 'class_method', header => 'CLASS METHODS' } ], | ||
| 134 | [ '@MAXHQ/Methods', _exp('Collect'), { command => 'method', header => 'METHODS' } ], | ||
| 135 | |||
| 136 | # Footer | ||
| 137 | [ '@MAXHQ/Leftovers', _exp('Leftovers'), {} ], | ||
| 138 | [ '@MAXHQ/postlude', _exp('Region'), { region_name => 'postlude' } ], | ||
| 139 | [ '@MAXHQ/Authors', _exp('Authors'), {} ], | ||
| 140 | [ '@MAXHQ/Legal', _exp('Legal'), {} ], | ||
| 141 | # the "List" transformer requires Pod::Elemental::Transformer::List to be installed: | ||
| 142 | [ '@MAXHQ/List', _exp('-Transformer'), { 'transformer' => 'List' } ], | ||
| 143 | ); | ||
| 144 | } | ||
| 145 | |||
| 146 | 1; | ||
| 147 | |||
| 148 | __END__ |