Juanma Barranquero wrote:Yup, confirmed, that's a bug in perl:[Sat Nov 15 17:39:17 2003] [error] [client 127.0.0.1] Modification of a read-only value attempted at C:/bin/Perl/lib/Config.pm line 75. , referer: http://localhost/perl-status
% perl-5.8.1-ithread -le 'use threads; require Config; \
threads->new(sub { })->detach; print Config::myconfig()'
Modification of a read-only value attempted at /home/stas/perl/5.8.1-ithread/lib/5.8.1/i686-linux-thread-multi/Config.pm line 88.
One of which I am guilty, I'm afraid. This was one of the memory saving fixes I submitted for 5.8.1. To fix this with 5.8.1 and 5.8.2, please add the following code to your program (or to Apache::Status possibly?):
use Config;
BEGIN {
if ($Config::Config{useithreads} and $] > 5.008 and $] < 5.008003) {
no strict 'refs';
no warnings 'redefine';
sub Config::myconfig {
return $Config::summary_expanded if $Config::summary_expanded;
($Config::summary_expanded = $Config::summary) =~ s{\$(\w+)}
{ my $c = $Config{$1}; defined($c) ? $c : 'undef' }ge;
$Config::summary_expanded;
} #Config::myconfig
}
}I reported it to p5p and CC'ed you.
However this works:
% perl-5.8.1-ithread -le 'use threads; require Config; \ my $config = Config::myconfig(); threads->new(sub { })->detach; \ print $config'
though it didn't help in Apache/Status :( I guess temprorary we could call a slow external query:
qx[$^X -V]
but I'll just disable it till this ussue gets resolved.
This code should resolve the issue for 5.8.1 and 5.8.2. I'll supply patches for 5.8.3 to p5p.
Liz
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
