Perl under MacOS X

Peter Edwards peter at dragonstaff.co.uk
Thu Jun 2 12:01:02 BST 2011


I went through setting up perl on a new mac book last month

On 2 June 2011 09:10, Leo Lapworth <leo at cuckoo.org> wrote:

> Install any version of XCode... (you actually only need the 'unix tools'
> bit).
>
> Watch out for XCode 4  (and I don't just mean the *ridiculous* 4.5GB
download just to get a working gcc)
see the problem described at

http://stackoverflow.com/questions/5256397/python-easy-install-fails-with-assembler-for-architecture-ppc-not-installed-on
that will stop PathTools building when installing perlbrew

fiX0r with
$ echo 'export ARCHFLAGS="-arch i386"' >> ~/.bash_login


then from a terminal window run:
>
> curl -L http://xrl.us/installperlosx | bash
>
> It will sort out your .bash_profile (if needed - so it looks at
> .bashrc), install Perlbrew, setup perl 5.14.0 and also install cpanm
>
> Feedback / issues reports welcome, please report via
> https://github.com/ranguard/installing-perl/
>
> Thanks
>
> Leo
>

Oh that's pretty neat Leo.  It would be great of you could add that to
http://www.perl.org/get.html
which is where I went (top Google hit for installing perl on mac).

After spending some time trawling around and playing with
macports - only has perl 5.12
homebrew - no perl provided, I assume it expects you to use your system perl

I ended up using local::lib + perlbrew, which works well and got me a local
perl 5.14 without touching/breaking the mac system one.


For real dev I'm running Debian 6 under Virtualbox in seamless mode - sweet!
You can mix up your Mac and Unix apps and windows.
I copied it over from a Windows Vista host to Mac and it Just Worked.
http://www.virtualbox.org
http://www.makeuseof.com/tag/virtualboxs-seamless-mode-combine-operating-systems-desktop/


For bonus points I guess we could build a VM with Perl on and add that as
another Mac dev option to the www.perl.org/get.html page
like these pre-built developer VMs for virtualbox:
http://www.oracle.com/technetwork/community/developer-vm/index.html


Regards, Peter
http://perl.dragonstaff.co.uk


More information about the london.pm mailing list