Installing ActivePerl on OS X Lion

Posted by herbaware on 2012-04-19 10:56

Hi, I may eventually figure this out, but I cannot get the manual part of the installation process to work. I am stuck at the configuration part. OS X Lion. I am trying to do this as a student/novice, because my system Perl did not perform as it should....it told me none of the documentation was in existence, and I couldn't get on to the second exercise after "hello World, " in LEARNING PERL. It actually said that there was "No documentation found for "perlfunc".

Then, after extensive searching, I found that OSX has defective/incomplete Perl.

So here I am, trying to manually configure ActivePerl, and not getting anywhere.

Do I need to describe the command as:

sudo installer -pkg /Users//ActivePerl-<5.14>.pkg -Macintosh HD/Library /

or

sudo installer -pkg /Users//ActivePerl-<5.14>.pkg -macintoshhd/library /

? I would be so grateful for some pointers.
Regards,
herbaware

grahams
ActiveState Staff
Fri, 2012-04-20 13:10

There is a small amount of post-install configuration. If the configuration is not
done, the Apple System Perl will still be the only Perl on $PATH, so it will be
the default Perl.

http://docs.activestate.com/activeperl/5.14/install.html#os%20x%20config...

herbaware | Fri, 2012-04-20 14:29

I am thankful for your help. I have had no luck with those at all, and in fact received "command not found" for both

$ export PATH=/usr/local/ActivePerl-5.14/bin:$PATH
and
$ export PATH=/usr/local/ActivePerl-5.14/site/bin:$PATH

I assume that is reflective of how lacking my System Perl is?? It really seems like PErl is a crap shoot, and my 15" MacBook Pro did not get the winning number.

I just finally got up the nerve to attempt:

PATH=/usr/local/ActivePerl-5.14/bin:$PATH

which did NOT work,
and then
PATH=/usr/local/ActivePerl-5.14/site/bin:$PATH
export PATH
which worked!

so perl -v brought up the ActivePerl info, so now I hope to be able to go through a few lessons and add the modules necessary to survive the end of the semester project! I was about to give up and use a Windows machine. Thank you for your patience and support!

herbaware | Fri, 2012-04-20 14:51

Basically what seems to be happening, is that the command to make it permanent did not do that. So I had to re-enter the command to gain access to the 5.14 version.

Does anyone know why the default won't stick?
Also, the one below was the one that actually worked. Not the second in the prior post.

PATH=/usr/local/ActivePerl-5.14/bin:$PATH

grahams
ActiveState Staff
Mon, 2012-04-23 09:34

Environment changes made at the command line in any shell, on any operating system, are temporary. "export" tells the shell to pass the variable along to any child shells, but if you restart, everything goes back to the defaults. To make "permanent" changes, you'll need to make changes in your .profile, which is your personalised shell configuration file.

OS X isn't as helpful as it could be for this, as OS X makes the assumption that all users are going to use GUI tools. OS X will not create a .profile for you automatically when a new user is added.

Personal .profiles are made by copying the system default /etc/profile to your user's home directory. Once you have a copy for yourself, you can make permanent changes to your startup profile by changing the entries in the .profile. Expanding the PATH variable is a typical user customization, so that's why it's shown as an example in the Configuration section.