NAME
Module::Setup - a simple module maker "yet another Module::Start(?:er)?"
SYNOPSIS
simply use
$ module-setup Foo::Bar
make flavor
$ module-setup --init catalyst-action # create a "catalyst actions" flavor
edit for flavor
$ cd ~/.module-setup/flavor/catalyst-action/template && some files edit for catalyst action templates
use flavor
$ module-setup Foo catalyst-action # create to Catalyst::Action::Foo module
redistribute pack for flavor
$ module-setup --pack MyFlavorCatalystAction catalyst-action > MyFlavorCatalystAction.pm
using redistributed flavor
$ module-setup --direct --flavor-class=+MyFlavorCatalystAction New::Class
importing redistributed flavor
$ module-setup --init --flavor-class=+MyFlavorCatalystAction new_flavor
install additional template
$ module-setup --flavor-class=+MyFlavorCatalystDBIC --additional=DBIC catalyst
redistribute pack for additional template
$ module-setup --pack --additional=DBIC MyFlavorCatalystDBIC catalyst > MyFlavorCatalystDBIC.pm
redistribute pack without additional template
$ module-setup --pack --without-additional MyFlavorCatalyst catalyst > MyFlavorCatalyst.pm
for git
$ module-setup --plugin=VC::Git Foo::Bar # or edit your ~/.module-setup/flavor/foo/config.yaml
DESCRIPTION
Module::Setup is very simply module start kit.
When the module-setup command is executed first, a necessary template for ~/.module-setup directory is copied.
What's difference Module::Setup and Module::Starter?
Module::Starter is very useful module. However customize of module template is complex.
If Module::Starter::PBP is used, do you solve it?
Yes, but switch of two or more templates is complex.
If Module::Setup is used, switch of template flavor is easy.
flavor customized uniquely becomes the form which can be redistributed by "module-setup --pack".
if incorporating Module::Setup in your application, you can make Helper which is well alike of Catalyst::Helper.
Example For Incorporating
use Module::Setup;
my $pmsetup = Module::Setup->new;
local $ENV{MODULE_SETUP_DIR} = '/tmp/module-setup'; # dont use ~/.module-setup directory
my $options = {
# see setup_options method
};
$pmsetup->run($options, [qw/ New::Module foo_flavor /]); # create New::Module module with foo_flavor flavor
AUTHOR
Kazuhiro Osawa <ko@yappo.ne.jp>
walf443
hidek
tokuhirom
SEE ALSO
Module::Setup::Plugin, module-setup
this module's base code is pmsetup written by Tatsuhiko Miyagawa.
some pmsetup scripts are in a http://svn.coderepos.org/share/lang/perl/misc/pmsetup
REPOSITORY
svn co http://svn.coderepos.org/share/lang/perl/Module-Setup/trunk Module-Setup
Module::Setup is Subversion repository is hosted at http://coderepos.org/share/. patches and collaborators are welcome.
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.