develooper Front page | perl.perl5.porters | Postings from October 2005

Lethal problem with %Config and local in 5.8.7

Thread Next
From:
Benjamin Franz
Date:
October 3, 2005 15:11
Subject:
Lethal problem with %Config and local in 5.8.7
Message ID:
Pine.LNX.4.61.0510031454390.6901@high-mountain.nihongo.org
I was trying to install Test::Plan and couldn't figure out why it kept 
failing a few of its tests with the message '%Config::Config is 
read-only'. After digging, I discovered that 'local' does not appear to be 
localizing the tied %Config hash correctly as demonstrated by the 
following test code:

#!/usr/local/bin/perl5.8.7
use Config;
local *Config::STORE = sub { 1; };
local $Config{extensions};

which results in the following when run under 5.8.7 (but not under 5.8.6 
or older):

%Config::Config is read-only
%Config::Config is read-only

This seems fairly serious since it means that no module using 'Test::Plan' 
(or presumably any other module expecting to be able to override %Config) 
can be installed from CPAN by default.

Is this a known bug? I dug into RT, and Randall's bug #35865 'tied hash 
bug' looks related, but I'm not really sure it is the same....

If it is the same as #35865, it should be elevated to 'HIGH' rather than 
'LOW'. This is a serious enough bug that I will have to rip 5.8.7 out of 
all my servers and roll back to 5.8.6.

-- 
Benjamin Franz

Simple things should be simple, complex things should be possible.
                                          - Alan Kay


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About