[Fwd: [cpan #6800] Thread safety: work around perl sort bug]

2004-06-30 Thread Geoffrey Young


 Original Message 
Subject: [cpan #6800] Thread safety: work around perl sort bug
Date: Wed, 30 Jun 2004 05:42:03 -0400 (EDT)
From: Guest via RT [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: undisclosed-recipients:;


This message about Apache-Test was sent to you by guest  via rt.cpan.org

Full context and any attached attachments can be found at:
URL: https://rt.cpan.org/Ticket/Display.html?id=6800 

perl-5.8.4. Apache-Test-1.12.
If thread safety is important to this module, suggest in TestServer.pm
you change:
  my $by_port = sub { $vh-{$a}-{port} = $vh-{$b}-{port} };

  for my $module (sort $by_port keys %$vh) {
to, something like:
  for my $module (sort { $vh-{$a}-{port} = $vh-{$b}-{port} } keys %$vh) {

i.e. inline the sort sub to work around perl bug #30333
threads sort crashes with sort subroutine (but not with sort block).

/-\


Re: [cpan #6800] Thread safety: work around perl sort bug

2004-06-30 Thread Stas Bekman
Thanks Andrew. But it's not a problem for us, since we don't run Apache-Test 
under threads.

--
__
Stas BekmanJAm_pH -- Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide --- http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com