MacPort
Headline
For this type of error, after an OSX migration: Use of uninitialized value $version in substr at /loader/0x855460/App/perlbrew.pm line 19. …
The reason is the missing execution bit on a perlbrew perl installation ex: ~/perl5/perlbrew/perls/perl-5.14.2/bin/perl)
Headline
From: http://apple.stackexchange.com/a/58701 (Scott Pack)
For various and sundry reasons upgrading the OS requires one to separately upgrade/reinstall MacPorts. The developers have actually created a pretty nice Migration page that details the process necessary to get your ports environment working again after upgrading the OS.
Summarized, the steps you need to follow are:
- Download and install new Xcode.
- Make sure command line (gcc, make, etc.) tools are installed. From within the Xcode application go to Preferences→Downloads and install them.
- Download the MacPorts installer of choice for your OS version.
- Install it.
- Open your terminal of choice.
- Run the command
port -qv installed > myports.txt
This grabs a copy of all installed ports.
- Uninstall all the ports:
sudo port -f uninstall installed
- Tidy up your play area:
sudo port clean all
- Go through the file myports.txt and reinstall the packages you actually want.
I actually sped up my reinstall process by editing the myports.txt file, such that it contained the names (and only the names) of the packages I wanted with one package per line, and running the following command
cat myports.txt | xargs -n1 port install
What this does is go through that file and execute the command port install line for every line in the file. It is a useless use of cat, butwho cares, it's easier to read.
From http://www.perlbrew.pl Then curl -kL http://install.perlbrew.pl | bash