There are two build systems for building a module. One is to use the old and stable “ExtUtils::Makemaker”, and new one is using “Module::Build”. We will use the Module::Starter module to help us create a module.
By default, Module::Starter create a distribution with Makefile.PL
First with Makefile.PL
1 2 3 4 5 6 7 8 9 10 |
|
Next we will show you the “Build.PL”
1 2 3 4 5 6 7 8 9 10 |
|
For the Module::Build way, there is a shortcut.
We don’t want to type that long command line every time, so module-starter can get that information from a
configuration file $HOME/.module-starter/config. If we’re on Windows, that .module-starter name is a bit of a
problem, so we can set the MODULE_STARTER_DIR environment variable to the name of the directory that contains
config. Inside config, we can list the parameter names and values separated by a colon.
1 2 3 4 |
|
Once we have our configuration file setup, life is much easier since we only need to specify the name of the distribution that we want to create.
1
|
|