[pm-h] TMTOWTD Makefile.PL

Will Willis will.willis at gmail.com
Wed Dec 16 22:47:39 PST 2009


I'm writing a module. I've written plenty before, tests and all.. but
only recently have I started paying attention to Makefile.PL as I
consider uploading to the CPAN.

While going through a Catalyst book I got some experience with the
inc::Module::Install convention. I'm using module-starter to create
skeleton modules, which by default uses the ExtUtils::MakeMaker
approach to the Makefile.PL

My main point of concern is getting the module dependency list
included with my distribution, inc::Module::Install's approach is very
straight forward, using the requires subroutine. MakeMaker's appears
to go into the PREREQ_PM hash ref.

So as I feel my way through the path of module authoring I've come up
with a few questions (and I'm sure more will follow):


1) Is my understanding of how dependencies are defined with these 2
modules mentioned above correct?

2) What are the pros/cons of using one module over the other?

3) Is Build.Pl and Module::Build yet another way to accomplish the
same task? I see that some people (on this list) provide both a
Build.PL and Makefile.PL with their packages. Why?

4) It appears that the Makefile.PL serves a few purposes like
providing meta data and dependencies. What else should I be aware of?

5) regarding MakeMaker, I see some useful meta data in
META_MERGE->{resources}, where exactly does that info get used?

6) I remember once scanning an electronic copy of "Writing Perl
Modules for CPAN" many moons ago... the book is now ~7 years old. Are
there other up-to-date resources out there for writing and deploying
modules to CPAN? Or is this book still relevant?


Thanks in advance!!

-Will
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/mailman/private/houston/attachments/20091217/ddb0bc4f/attachment.html>


More information about the Houston mailing list