I think h2xs is very out of date as far as current best practices for modules. It's also very intimidating for people who just want to create a module, and have no need for all the compiler hoohah that h2xs throws at you. Module::Starter is meant to make things much eaiser.
Here's a sample run of Module::Starter's command-line program:
$ module-starter --module=Foo,Foo::Bar,Foo::Bat --email=andy@petdance.com --author="Andy Lester"
$ find Foo
Foo
Foo/.cvsignore
Foo/Changes
Foo/lib
Foo/lib/Foo
Foo/lib/Foo/Bar.pm
Foo/lib/Foo/Bat.pm
Foo/lib/Foo.pm
Foo/Makefile.PL
Foo/MANIFEST
Foo/t
Foo/t/00.load.t
Foo/t/pod-coverage.t
Foo/t/pod.t
$ cat Foo/Makefile.PL
use strict;
use warnings;
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Foo',
AUTHOR => 'Andy Lester <andy@petdance.com>',
VERSION_FROM => 'lib/Foo.pm',
ABSTRACT_FROM => 'lib/Foo.pm',
PREREQ_PM => {
'Test::More' => 0,
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Foo-*' },
);
Comments are welcome, and expected.
Looks Good (Score:1)
Re:Looks Good (Score:2)
I definitely like Tony's idea of a configuration file. Perhaps something like the one the cpan-upload [cpan.org] script uses.
Re:Looks Good (Score:2)
Nope, and it highlights the danger of how I've been doing new module creation: Cut & paste from an existing good module.
--
xoa
Multiple periods in filenames... (Score:1)
ExtUtils::ModuleMaker (Score:1)
It hasn't been updated in awhile and I do like the name Module::Starter better. Just wanted to bring it to your attention if you didn't know about it.
-biz-
Re:ExtUtils::ModuleMaker (Score:2)
--
xoa
Re:ExtUtils::ModuleMaker (Score:1)
I take back not being recently updated, Geoff updated it in June of 2003 (during the last YAPC::NA in Boca Raton where he did a presentation on it)
Kinda like does what you want with the command line tool 'modulemaker' (reminds me of brian d foy's 'release').
-biz-
Re:ExtUtils::ModuleMaker (Score:1)
Ron Savage has Module::MakeDist
Jonas B. Neilson has Module::Template::Setup
Those were the ones I found by doing a search of "Module" on search.cpan.org
Re:ExtUtils::ModuleMaker (Score:2)
When I was researching this for an upcoming TPJ article, I found all sorts of prior implementations, most of which are not on CPAN. As with a lot of things people hack on something to get what they want, and that is where their work stops.