Monthly Archive for August, 2006

clsung: [perl] post-patch of perl 5.6 for perl 5.00503

The best reference is always PR.
Let’s take a look at ports/96304.
See the “post-patch:” section:
@${PERL} -pi -e 's/^our (\W\w+);/use vars q($$1);/o;' \
-e 's/^our\s+(\W\w+)(?!;)/use vars q($$1); $$1/o;' \
-e 'undef $$_ if /^\s*(no|use) warnings/o;' \

Okay, that should fix lots of ports which broken in perl 5.00503. Examples of error like:

Could not eval ‘
package ExtUtils::MakeMaker::_version;
no strict;

local $VERSION;
$VERSION=undef; do {
our $VERSION = “0.003”;
‘ in lib/XXX/ Can’t modify subroutine entry in scalar assignment at (eval 6) line 7, at EOF

But the best way, IMHO, is mark IGNORE and encourage users to upgrade their perl version to latest one :)