in reply to Alternatives to Module::Starter

I once spend an hour or so determining what I want as a boilerplate. Which is just a few files: Makefile.PL (tailered to what I want), MANIFEST, MANIFEST.SKIP (for .git, .gitignore, and MANIFEST.SKIP itself), Changes (with just one line), README (empty), t/000_load.t (just tests whether the module loads), t/001_pod.t (checks for pod compliance), a skeleton .pm file, and a .gitignore file. Then I spend another hour writing a simple Perl script which takes the name of the module-to-be as argument, and uses that to create the mentioned files, in a appropriate directory. It also sets up the directory as a git repository, and does an initial checkin of the files created.

Two hours very well spend. Sure, I end up with something that only works for me, but who cares? Now I can just type "cpan-start My::Module", and two seconds later I can start actual coding, instead of manually editing whatever a more general module or script has produced. If my preferences change over time, I just modify the script (and since it's just my script, I don't have to care about backwards compatibility, or have it do something something else way want). If I ever were to create XS modules on a more regular basis, I'd modify the script to take an -xs option, and create a different skeleton. Now I create XS modules so infrequently, I just use h2xs and do some manual editing afterwards.

My advice: figure out what *you* want, and write a script that just does that. Takes far less time than trying to find out whether someone has written and published something that does exactly what you want.

Replies are listed 'Best First'.
Re^2: Alternatives to Module::Starter
by educated_foo (Vicar) on Jan 14, 2012 at 23:27 UTC
    My advice: figure out what *you* want, and write a script that just does that. Takes far less time than trying to find out whether someone has written and published something that does exactly what you want.
    This. I started with the stuff generated by h2xs -AXn, deleted the unwanted bits, and created a script printing templates based on what was left. That took an hour or so, and I can now create new modules without dealing with silly prereqs and mountains of BS from Module::Starter and friends.