Just another Perl shrine | |
PerlMonks |
Re: Trying to build a module for upload to CPANby kcott (Archbishop) |
on Oct 29, 2021 at 06:54 UTC ( [id://11138170]=note: print w/replies, xml ) | Need Help?? |
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:
And, just to give you an idea of the templates, Module.pm has:
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:
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):
I've used this method dozens (if not hundreds) of times and not encountered problems: it seems robust and stable. — Ken
In Section
Seekers of Perl Wisdom
|
|