I'm going to support Apple's answer that if you want to install random things using CPAN, then you want to have a full development toolkit. In this case you can get away without it.

Here are fuller details.

The "make" tool is short for "make it so". It is a rule-based engine that takes information in a Makefile and makes sure that all of the things specified in the Makefile have happened in the specified order. If it finds that a specific step has happened in order, it won't redo it unless it has to.

This is widely used to automate building and installing complex pieces of software (like Perl) because it allows you to break a complex system into simpler pieces, and put the pieces back together. It also allows you to recompile the whole system after a small edit, only recompiling what needs to be recompiled. (Well, that is the theory. Practice is not always perfect...)

Now here is the problem. If you don't have a development toolkit, then adding make by itself won't get you very far. Because next you need a C compiler. And you may need header files for random libraries in the operating system. And so on. Furthermore problems because of missing stuff are going to be difficult to debug. (Randomly, what do you do when ioctl.h is missing? Do you know how to recognize that what you're missing is ioctl.h?)

Therefore it is far simpler to just install a basic development environment, so that make is there, any probing utilities that you expect are there, header files that get referred to are available, etc.

In this case, though, you have a pure Perl module. Its requirements are Carp (comes with Perl) and File::Spec 0.82 or better (also comes with Perl). If you have those, then you should be able to grab the distribution, untar it, and copy Template.pm to HTML/Template.pm in some appropriate directory. You can run, "perl test.pl" and look at the OKs to see that it worked.

Now, you ask, why would Apple provide Perl and CPAN but not make? Well it is silly, but there is a reason. They supply Perl because Perl is useful for all sorts of tasks, and is one of the things that various other pieces of software are likely to rely on. So they need Perl as part of the Unix toolkit. Perl doesn't work well unless you have its standard library, so they include the standard library. CPAN is part of the standard library so it is included. And then it just wasn't worth Apple's time to track down inside of Perl the fact that CPAN won't be useful without make - in fact shipping Perl with only part of the library becomes a legal issue and that immediately makes it something that they see no point in doing.

Incidentally I don't know about your version of CPAN, but VERSION 1.76_01 has references to a module called Mac::BuildTools, so it looks like more recent versions of Perl and/or OS X have noticed the stupidity that you did and made sure that Perl comes with a basic toolkit that will make simple installs (like HTML::Template) work without make.

UPDATE: I'd believe adrianh. I'm glancing at code under Linux and don't run MacOS. However looking at the Makefile.PL, it is too bad that Makefile.PL doesn't have a way to run for simple, pure Perl modules, that lets it coordinate with CPAN without make. I guess that's what Module::Build is trying to do with CPANPLUS. However it would be nice to get the effect without rewriting the majority of simple, pure Perl modules...


In reply to Re: OT, sort of: "make" on OSX by tilly
in thread OT, sort of: "make" on OSX by Cody Pendant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.