Upgrading perl from 5.12 to 5.16?

Ryan Schmidt ryandesign at macports.org
Mon May 27 12:37:06 PDT 2013


On May 27, 2013, at 13:33, Johannes Kastl wrote:

> I wanted to upgrade my perl installation from 5.12 to 5.16.
> force-deactivating perl5 and reinstalling with +perl5_16 variant
> worked, I though.

Ok. You shouldn't have had to force-deactivate anything though. Simply installing perl5 +perl5_16 on top of the existing perl5 port should have caused MacPorts to deactivate the existing perl5 port automatically.


> But "port info perl5" or "port variants perl5" still did not show
> anything about 5_16 being the selected variant:

> After that I figured out that the installed variants are only shown in
> "port installed perl5", which shows:
>> The following ports are currently installed: perl5
>> @5.12.4_0+perl5_16 (active)

As you've discovered, "port info" and "port variants" are not intended to tell you anything about ports you have installed, only about ports that are available. "port installed" tells you about ports that are installed.


> 1. Is there a right way to change from perl 5.12 to 5.16 (and 5.18 or
> 5.20 in the future)?

If by "change" you mean "change what /opt/local/bin/perl is a symlink to", then the answer is to install the perl5 port with the variant corresponding to the version of perl you want it to be a symlink to.

Note that perl in MacPorts is unusual and unique in this method, and it may be changed in the future to the "port select" mechanism we use most everywhere else. Perl in MacPorts simply predates "port select" and hasn't yet been updated to use it.

https://trac.macports.org/ticket/29763


> 2. How to upgrade the p5-* ports? Is there a short command, or do I
> have to do multiple greps, akws and seds to get from e.g.
> p5.12-image-exiftool to p5.16-image-exiftool?

You can install p5.12-image-exiftool and p5.16-image-exiftool simultaneously, and in general any p5.X-Z and p5.Y-Z. If you no longer want p5.12-image-exiftool and now want p5.16-image-exiftool, uninstall the former and install the latter.


On May 27, 2013, at 14:11, Johannes Kastl wrote:

> 3. How to get intltool to use p5.16 instead of 5.12 for its
> dependencies? Reinstalling gimp2 and inkscape leads to some p5.12-*
> modules being installed.

There is intentionally no way for you to do so. Ports like intltool that use specific perl modules must depend on a specific perl version thereof. Currently the default perl in MacPorts is 5.12. I'm sure we'd be willing to entertain the idea of changing what the default perl is, but it should then be done uniformly in all ports.







More information about the macports-users mailing list