makepmdist

TorgoX on 2002-02-16T18:33:22

I've written a program called makepmdist (which I'm planning to put in CPAN, once I get a bit of feedback on it) that simplifies the task of making a dist of a single module. It's not meant to handle every kind of module in CPAN. It's just meant to the common case of a pure-Perl modules that is the only module in its dist. (For example, that describes about half of the dists in my CPAN directory.)

Basically, you say "makepmdist Foo.pm" and it does some very minimal sanity-checking on Foo.pm, then makes a temp directory in which it copies Foo.pm, makes a Makefile.PL, a README, a MANIFEST, and a t/test.t. Details of the contents of the Makefile.PL and the t/test.t are controlled by optional =for blocks in the Foo.pm file. (It also does some nice things like make sure that the Foo.pm that gets disted is in Unix newline format and has a $VERSION; and it warns about any ridiculously long lines in the file.) Then it makes test, dist, clean, moves the resulting .tar.gz up and out, and kills the temp dir -- unless there was a fatal error along the way, at which point it would just abort and let you ponder the temp dir's contents.

I wrote this because someone at YAPC about two years ago said it'd be nice if disting a module were a one-step process; and I liked that idea. Well, it almost is one-step now, if the module is simple enough (i.e., no XS, and is the only module in the dist), and if you don't count the part about actually submitting it to PAUSE, which would bring this to an aching TWO steps.

I would appreciate if people would look at the program at its temporary location, at
http://members.spinn.net/user/sburke/makepmdist_101.txt
and consider its docs, and test it out if you can, and let me know how it works for you.

You probably have questions, and they are probably answered in the Pod that's at the end of that program file.