Perl error, once and for all

Vincent Lefevre vincent-opdarw at vinc17.org
Sun Mar 1 16:57:56 PST 2009


On 2009-02-28 21:35:59 -0800, Bradley Giesbrecht wrote:
> I just want to install something that needs a perl and a p5 module. Do I 
> really need to RTFM for that?

MacPorts can do things for you or tell you what to do. Otherwise, yes,
you should RTFM. But this is not specific to perl...

> If I want to install a something written in C of C++ should I just RTFM?

This is a good example. MacPorts installs headers in /opt/local/include
and libraries in /opt/local/lib, and these are not standard locations
searched by compilers not installed by MacPorts (such as Apple's gcc
from Xcode). And it seems that MacPorts does not change the .profile to
declare these locations. So, if you want to install a C or C++ program
that needs such headers/libraries, you must tell it where to find them.

> I have a question. Why are there man pages for perl modules that are not 
> installed?

I'm not sure. I've also noticed that man pages from modules do not have
the same suffix (e.g. "3" instead of "3pm").

> Why do I have to -f an install to install a p5?

You shouldn't.

>>> Does anyone know how CPAN solves this?
>>
>> CPAN lets the user choose where he wants to install things.
>
> And that is what I decided to do, just not use macports for modules and 
> use cpan much like I use php pear.

But a CPAN user is not just a perl user or MacPorts user.

> And then I got totally confused by the cpan docs as to how to set up the 
> prefix.
>
> I hope there is a perl guru that can help us through this mess. Yes, I  
> think it's a mess.

Yes, it's a mess, but I finally managed to do what I wanted thanks to
the information found here:

  http://sial.org/howto/perl/life-with-cpan/non-root/

-- 
Vincent Lefèvre <vincent at vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


More information about the macports-users mailing list