NAME
Module::Setup::Plugin - Module::Setup Plugin
Trigger Point
befor_dump_config $config
config setup Module::Setup::Plugin::Config::Basic
after_setup_module_attribute
module attribute setup Module::Setup::Plugin::VC::SVN
after_setup_template_vars
template parameters setup
append_template_file $template_vars, $module_attribute
add module template file for new module Module::Setup::Plugin::VC::Git
template_process $options
for template process Module::Setup::Plugin::Template
check_skeleton_directory $attributes
for test L<Module::Setup::Plugin::Test::Makefile>
$attributes = +{
module_attribute => +{ module_attribute },
template_vars => +{ template_vars },
instal_files => +[ install_files ],
};
after_create_skeleton $attributes
aftter create_skeleton
finalize_create_skeleton $attributes
last trriger of run method
Plugin Example
~/.module-setup/flavor/myflavor/plugins/plugin.pl package MyFlavor::Plugin; use strict; use warnings; use base 'Module::Setup::Plugin';
use Path::Class;
sub register {
my($self, ) = @_;
$self->add_trigger( check_skeleton_directory => \&check_skeleton_directory );
}
sub check_skeleton_directory {
my $self = shift;
}
~/.module-setup/flavor/myflavor/config.yaml
config:
plugins:
- Config::Basic
- VC::SVN
- Template
- Test::Makefile
- +MyFlavor::Plugin
or command option
$ module-setup --plugin=+MyFlavor::Plugin New::Module