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.

— Ken


In reply to Re: Trying to build a module for upload to CPAN by kcott
in thread Trying to build a module for upload to CPAN by talexb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.