in reply to I installed mac ports and now all my cpan dependencies cannot be found

Can I live without local lib thing?

Yup, the local/lib thing is for folks who can't/won't  sudo cpan

Will mac ports NOT work with that line commented?

It probably won't, not if that is the only way it gets into $PATH

  • Comment on Re: I installed mac ports and now all my cpan dependencies cannot be found
  • Download Code

Replies are listed 'Best First'.
Re^2: I installed mac ports and now all my cpan dependencies cannot be found
by gideondsouza (Pilgrim) on Jan 26, 2013 at 09:56 UTC

    Thanks for the reply. So this is a mac ports problem. I'll do more digging on their forums then....

    Do you see any quick way out? Or I would have to change my .bash_profile everytime I use macports?

      gideondsouza:

      If you start the macports program with a script, you could always just add a command to set the path for that process. In bash, for example, you could just add an export PATH=... line before starting macports. I don't know how you would do that for a program started from an icon, but I'll bet you can do it if you dig through the docs. That way, macports can use it's version of perl, and for all your other work, you can use your version.

      You could always do the opposite, too, removing the /opt/local directory from your path before invoking your perl scripts. In fact, that's what I do at work. I have perl linked to a script that does a bit of bookkeeping, and it removes a couple of things from the path before starting up. I'm at home right now, but if I recall correctly, it was something like:

      #!/usr/bin/bash # My local perl libraries export PERL5LIB=/home/roboticus/LIB # Log when & what I run CURDTM=`date +'%Y%m%d-%H%M'` echo $CURDTM $@ >>~/.runlog # my perl executable Krevulax $@

      As I mentioned, it's from memory. I don't care for bash scripting, so I don't recall the tricky bits like parameter mucking, so I expect that I've misremembered the line that passes the shell parameters to perl, but this should give you the general idea.

      Just to satisfy any curiosity about "Why does he log the date and time of every script he runs?": My job is so crazy and I'm always jumping from task to task. Thus, I have a huge set of perl scripts littered around my machine. So when someone asks me "Hey, remember that thingamajig you did for me three weeks ago? Could you do it again for me?" I sometimes couldn't easily find it. So I added the logging and wrote a little report for myself that will list the different scripts I've run for a given date range. Once I recognize the name (I *do* try to give meaningful names to the scripts), I'm a simple "locate scriptname" away from it.

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.

      Thanks for the reply. So this is a mac ports problem. I'll do more digging on their forums then....

      I don't see how. In one perl you installed some module, but didn't install it in another perl.

      Do you see any quick way out?

      install the module using the mac ports perl

      Or I would have to change my .bash_profile everytime I use macports?

      Usually you change $PATH once, permanently, and then you're finished