Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

what format should Makefile.pl be and where is the list of attributes

by gideondsouza (Pilgrim)
on Jan 28, 2013 at 15:17 UTC ( #1015716=perlquestion: print w/ replies, xml ) Need Help??
gideondsouza has asked for the wisdom of the Perl Monks concerning the following question:

So my question is pretty simple.

I noticed most modules use ExtUtils::MakeMaker and their Makefile.PL looks like this:

use ExtUtils::MakeMaker; WriteMakefile( ATTRIBUTE => VALUE [, ...] );

But some distributions, like Net::GitHub look very different:Link to the Makefile.pl.

This seems to use inc::Module::Install.

  • Q: Which method is is preferred?
  • Additionally I noticed Net::GitHub has a repository attribute with a link to the github repo, I didn't know about this attrib, and it seems pretty useful since both search.cpan.org and metacpan.org will show this on the release info. Q: Where can I find a list of attributes needed/used by various cpan clients?

Comment on what format should Makefile.pl be and where is the list of attributes
Download Code
Re: what format should Makefile.pl be and where is the list of attributes
by Anonymous Monk on Jan 28, 2013 at 15:41 UTC
Re: what format should Makefile.pl be and where is the list of attributes
by tobyink (Abbot) on Jan 28, 2013 at 17:27 UTC

    Virtually all Makefile.PLs use ExtUtils::MakeMaker, except for some which are slim redirects to Build.PL in Module::Build-based distributions (which don't use makefiles).

    Module::Install is just a wrapper around ExtUtils::MakeMaker. It happens to be rather a good wrapper that enables you do some useful packaging stuff automatically, like automatically create your README file from your main module's pod, automatically make you a coffee at the end of the build process, etc.

    (And there's also Module::Package, which is a wrapper around Module::Install.)

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name
Re: what format should Makefile.pl be and where is the list of attributes
by davido (Archbishop) on Jan 28, 2013 at 20:10 UTC

      Excellent this is the filter/pointer I was looking for.

      Generally I've been scrounging many books on my kindle and just getting hands on dirty. But I was considering buy a physical copy of intermediate perl and studying it back and forth.

Re: what format should Makefile.pl be and where is the list of attributes
by DrHyde (Prior) on Jan 29, 2013 at 11:11 UTC

    Using ExtUtils::MakeMaker is preferred.

    The 'repository' stuff ends up in META.yml, which is what search.cpan and metacpan (and a load of other sites like cpandeps) use, and you can also do it with EU::MM. Look for 'META_MERGE' in the doco. However, META.yml has historically been a bit of a moving target and some fields - including 'repository' - have moved around, so consult the documentation to make sure you put them in the right place.

    The current spec for META.yml is at CPAN::Meta::Spec.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1015716]
Approved by Corion
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (16)
As of 2014-09-02 15:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (25 votes), past polls