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

Re: How to install Date::Calc on a Mac

by steves (Curate)
on Nov 23, 2004 at 04:02 UTC ( #409797=note: print w/replies, xml ) Need Help??

in reply to How to install Date::Calc on a Mac

The standard procedure for installing all CPAN modules is basically the same:

  1. Copy the tar/gzip archive to your local machine;
  2. Unpack the tar/gzipped file contents;
  3. Go to the top level of the unpacked directory;
  4. Run the command perl Makefile.PL;
  5. Run the command make;
  6. Run the command make test;
  7. Run the command make install.

You may find some (mostly older) modules that have slightly different build procedures. If so, those will be documented in one of the unpacked files, usually with a name like README.

If there's a dependency, you'll usually be told in step (3), but sometimes not until step (4). For any required dependencies, you just follow the same procedures. That can, of course, lead to more dependencies. If any step fails, you typically do not want to proceed until you figure out why and fix it. I have found cases where some tests during the make test phase fail where it was okay for me to continue on after doing some analysis.

I pick a fixed root directory for all my downloaded CPAN unpacked archives (e.g., /usr/local/src/cpan). That way I can automate some of it and have a quick look at what I've downloaded and (probably) installed.

Normally, you will not break anything by installing new modules that don't already exist. If the make process tells you you need a newer version, then you may hit issues. In practice, I've only had one issue like that I can recall in 5+ years of downloading and installing CPAN modules. If you want to be really paranoid, you can create an entirely different code path and access it by modifying Perl's @INC path list.

The caveat: I'm not a MAC user so I may be missing some some system dependency there.

There are also packages that help automate the whole process, including finding, downloading, and installing dependencies. I'll let someone more familiar with those explain them.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://409797]
[oiskuu]: Hm. that depends on kernel compiled with CONFIG_AUDITSYSCAL L
[tye]: apropos my several mentions of audit
[Corion]: At least my (non-SELinux) Debian has that config thing set. I don't have non-Debian machines handy (except Android)
[Corion]: My Android phone also has /proc/self/ loginuid, but that displays -1 (resp. 4GB). That might be because the phone is rooted.

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2017-06-23 19:54 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (554 votes). Check out past polls.