.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Module::Package::Plugin 3pm" .TH Module::Package::Plugin 3pm "2021-01-08" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& package Module::Package::Name; \& \& package Module::Package::Name::flavor; \& use Moo; \& extends \*(AqModule::Package::Plugin\*(Aq; \& \& sub main { \& my ($self) = @_; \& $self\->mi\->some_module_install_author_plugin; \& $self\->mi\->other_author_plugin; \& } \& \& 1; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module is the base class for Module::Package plugins. .SH "EXAMPLE" .IX Header "EXAMPLE" Take a look at the Module::Package::Ingy module, for a decent starting point example. That plugin module is actually used to package Module::Package itself. .SH "API" .IX Header "API" To create a Module::Package plugin you need to subclass Module::Package::Plugin and override the \f(CW\*(C`main\*(C'\fR method, and possibly other things. This section describes how that works. .PP Makefile.PL processing happens in the following order: .PP .Vb 6 \& \- \*(Aquse inc::Module::Package...\*(Aq is invoked \& \- $plugin\->initial is called \& \- BEGIN blocks in Makefile.PL are run \& \- $plugin\->main is called \& \- The body of Makefile.PL is run \& \- $plugin\->final is called .Ve .SS "initial" .IX Subsection "initial" This method is call during the processing of 'use inc::Module::Package'. You probably don't need to subclass it. If you do you probably want to call the \&\s-1SUPER\s0 method. .PP It runs the deps_list, if any and guesses the primary modules file path. .SS "main" .IX Subsection "main" This is the method you must override. Do all the things you want. You can call \&\f(CW\*(C`all_from\*(C'\fR, if you need to get sequencing right, otherwise it gets called by \&\fBfinal()\fR. Don't call \f(CW\*(C`WriteAll\*(C'\fR, it get's called automatically in \fBfinal()\fR. .SS "final" .IX Subsection "final" This does all the things after the entire Makefile.PL body has run. You probably don't need to override it. .SH "OPTIONS" .IX Header "OPTIONS" The following options are available for use from the Makefile.PL: .PP .Vb 6 \& use Module::Package \*(AqFoo:bar\*(Aq, \& deps_list => 0|1, \& install_bin => 0|1, \& install_share => 0|1, \& manifest_skip => 0|1, \& requires_from => 0|1; .Ve .PP These options can be used by any subclass of this module. .SS "deps_list" .IX Subsection "deps_list" Default is 1. .PP This option tells Module::Package to generate a \f(CW\*(C`author_requires\*(C'\fR deps list, when you run the Makefile.PL. This list will go in the file \&\f(CW\*(C`pkg/deps_list.pl\*(C'\fR if that exists, or after a '_\|_END_\|_' statement in your Makefile.PL. If neither is available, a reminder will be warned (only when the author runs it). .PP This list is important if you want people to be able to collaborate on your modules easily. .SS "install_bin" .IX Subsection "install_bin" Default is 1. .PP All files in a \f(CW\*(C`bin/\*(C'\fR directory will be installed. It will call the \&\f(CW\*(C`install_script\*(C'\fR plugin for you. Set this option to 0 to disable it. .SS "install_share" .IX Subsection "install_share" Default is 1. .PP All files in a \f(CW\*(C`share/\*(C'\fR directory will be installed. It will call the \&\f(CW\*(C`install_share\*(C'\fR plugin for you. Set this option to 0 to disable it. .SS "manifest_skip" .IX Subsection "manifest_skip" Default is 1. .PP This option will generate a sane \s-1MANIFEST.SKIP\s0 for you and delete it again when you run \f(CW\*(C`make clean\*(C'\fR. You can add your own skips in the file called \&\f(CW\*(C`pkg/manifest.skip\*(C'\fR. You almost certainly want this option on. Set to 0 if you are weird. .SS "requires_from" .IX Subsection "requires_from" Default is 1. .PP This option will attempt to find all the requirements from the primary module. If you make any of your own requires or requires_from calls, this option will do nothing.