None
package Module::Package::Name; package Module::Package::Name::flavor; use Moo; extends 'Module::Package::Plugin'; sub main { my ($self) = @_; $self->mi->some_module_install_author_plugin; $self->mi->other_author_plugin; } 1;
This module is the base class for Module::Package plugins.
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.
To create a Module::Package plugin you need to subclass Module::Package::Plugin and override the \*(C`main\*(C' method, and possibly other things. This section describes how that works.
Makefile.PL processing happens in the following order:
- 'use inc::Module::Package...' 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
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.
It runs the deps_list, if any and guesses the primary modules file path.
This is the method you must override. Do all the things you want. You can call \*(C`all_from\*(C', if you need to get sequencing right, otherwise it gets called by final(). Don't call \*(C`WriteAll\*(C', it get's called automatically in final().
This does all the things after the entire Makefile.PL body has run. You probably don't need to override it.
The following options are available for use from the Makefile.PL:
use Module::Package 'Foo:bar', deps_list => 0|1, install_bin => 0|1, install_share => 0|1, manifest_skip => 0|1, requires_from => 0|1;
These options can be used by any subclass of this module.
Default is 1.
This option tells Module::Package to generate a \*(C`author_requires\*(C' deps list, when you run the Makefile.PL. This list will go in the file \*(C`pkg/deps_list.pl\*(C' 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).
This list is important if you want people to be able to collaborate on your modules easily.
Default is 1.
All files in a \*(C`bin/\*(C' directory will be installed. It will call the \*(C`install_script\*(C' plugin for you. Set this option to 0 to disable it.
Default is 1.
All files in a \*(C`share/\*(C' directory will be installed. It will call the \*(C`install_share\*(C' plugin for you. Set this option to 0 to disable it.
Default is 1.
This option will generate a sane \s-1MANIFEST\s0.SKIP for you and delete it again when you run \*(C`make clean\*(C'. You can add your own skips in the file called \*(C`pkg/manifest.skip\*(C'. You almost certainly want this option on. Set to 0 if you are weird.
Default is 1.
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.