G'day Alex,
I use Module::Starter
with Module::Starter::PBP as a plugin.
I use that plugin mainly because I like the templates which I customise a lot
(I also pull out the PBP specific parts, e.g. perlcritic.t).
I keep a number of config files for various purposes; e.g. OO mod, functional mod, $work mod, etc.
Each of these points to a different directory with my customised templates.
Here's the current one:
$ cat ~/.module-starter/config
author: Ken Cotterill
email: kcott@cpan.org
builder: ExtUtils::MakeMaker
plugins: Module::Starter::PBP
template_dir: /home/ken/.module-starter/P532
$ ls -al ~/.module-starter/P532
total 24
drwxr-xr-x+ 1 ken None 0 Jan 9 2021 .
drwxr-xr-x+ 1 ken None 0 Jan 6 2021 ..
-rw-r--r-- 1 ken None 89 Jan 5 2021 Changes
-rw-r--r-- 1 ken None 586 Jan 5 2021 Makefile.PL
-rw-r--r-- 1 ken None 82 Jan 9 2021 MANIFEST.SKIP
-rw-r--r-- 1 ken None 5205 Jan 5 2021 Module.pm
-rw-r--r-- 1 ken None 313 Dec 19 2020 README
drwxr-xr-x+ 1 ken None 0 Jan 9 2021 t
And, just to give you an idea of the templates, Module.pm has:
package <MODULE NAME>;
...
=head1 LICENCE AND COPYRIGHT
Copyright (c) <YEAR>, <AUTHOR> C<< <<EMAIL>> >>. All rights reserved.
...
Creating the module is a little easier with this plugin because you don't need to specify so many options
(e.g. the --author="Andy Lester" --email=andy@petdance.com, or equivalent, are not required).
Creating the distribution uses the fairly standard incantation:
perl Makefile.PL
make
make test
make dist
That last command creates the distribution tarball.
I'd generally want to also run Author Tests so something like this first
(your environment variable may have a different name):
$ export RELEASE_TESTING=1
I've used this method dozens (if not hundreds) of times and not encountered problems:
it seems robust and stable.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.