Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

GeeYouEye

macrumors 68000
Original poster
Dec 9, 2001
1,669
10
State of Denial
http://www.theregister.co.uk/2009/02/16/apple_update_perl_breakage/

Apple's latest Mac OS X security update has a knack for breaking Perl, according to Mac users across the web.

"I've just done the update using Software update and just about everything I look at is working, except that perl seems to have gone almost AWOL," says one Mac OS X user, with a post to Apple's support forum.

"I seen it pop up occasionally in the Activity Monitor, but, when I try to run perl scripts from the command line or the cron jobs that ran flawlessly before the update, nothing happens. Period."

Two additional support forum visitors say they've experienced similar problems with the popular programming language following Mac updates, and others have complained of Perl breakage on a public Perl mailing list and an independent blog.

Apple did not immediately respond to a request for comment. The company released its Security Update 2009-001 on Thursday.

According to blogger Tatsuhiko Miyagawa, Perl breakage only occurs if you're running Leopard (Mac OS X 10.5), you're using the Perl distro baked into the OS, and you've updated the distro via CPAN (Comprehensive Perl Archive Network), a widely-used collection of existing Perl modules.

Miyagawa's post says the problem generates error messages that look something like this:

Code:
% perl -MIO IO object version 1.22 does not match bootstrap parameter 1.23 at /System/Library/Perl/5.8.8/darwin-thread-multi-2level/XSLoader.pm line 94.

Compilation failed in require. BEGIN failed--compilation aborted

This would indicate that Apple's security update reverts Mac Perl to an older IO object incompatible with newer CPAN modules. "The Security Update brings (old) IO.bundle with version 1.22 but your IO.pm has been updated to the latest 1.23 on CPAN shell. (But hey, 1.23 was released in 2006...Why do you bring that ancient version back, Apple!?)," Miyagawa writes.

The blogger claims you can fix the problem if you reload the IO module. But since Perl is broken, this takes a little finesse. "The fix is to update IO.pm to 1.23, but since IO.pm is now broken, you can't even run CPAN shell to do this (Ugh!). You need to go to CPAN and grab IO-1.2301.tar.gz, unpack it and run 'perl Makefile.PL; make; sudo make install' to fix this."

And one support forum poster says the fix is only a partial solution.

"This is another reason why you shouldn't use Perl that comes from vendors," Miyagawa says. "Apple isn't any different from Fedora on this!"
 

kainjow

Moderator emeritus
Jun 15, 2000
7,958
7
Perl is one of the worse languages when it comes to readability. I don't know why people still use it.

Back on topic... you think Apple would have tests to make sure they don't break simple things like this?
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
Dallas, TX
Perl is one of the worse languages when it comes to readability. I don't know why people still use it.

IMO opinion Perl allows for the worst readibility, but bad programmers can make any language hard to read, and good ones can make almost any language readable. Perl doesn't REQUIRE you to write unreadable code.

I really have nothing to add that is on-topic. I'm sure we've all goofed with something like this at one time or another (if we've been doing this long enough).

-Lee
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
IMO opinion Perl allows for the worst readibility, but bad programmers can make any language hard to read, and good ones can make almost any language readable. Perl doesn't REQUIRE you to write unreadable code.

Ditto.

As I learned Perl I realized all that hard to read code was by choice of the programmers. Probably partly an elitist attitude of some, but Perl certainly can be very readable as other languages are.

Apple likely has tests for many things, but since Perl isn't there own thing, they likely don't give a ton of effort there or for most things in Unix underpinnings. Does seem like a very weird bug to emerge though. Maybe someone got click happy and deleted something then tried to remember what it was they just deleted and put the wrong version back in. Not likely, but it may have been an accident of some sort that no one noticed.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.