perl-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject failing to import() with worker mpm and bleadperl
Date Thu, 17 Jan 2002 17:48:49 GMT
As a workaround for the first problem described in my last email, I've 
preloaded explicitly the most important module without which the threads 
won't start:

Index: t/hooks/TestHooks/init.pm
===================================================================
RCS file: /home/cvs/modperl-2.0/t/hooks/TestHooks/init.pm,v
retrieving revision 1.1
diff -u -r1.1 init.pm
--- t/hooks/TestHooks/init.pm	6 Oct 2001 19:44:30 -0000	1.1
+++ t/hooks/TestHooks/init.pm	17 Jan 2002 17:42:45 -0000
@@ -49,6 +49,7 @@

  1;
  __DATA__
+PerlModule TestHooks::init
  PerlInitHandler TestHooks::init::second
  <Base>
      PerlInitHandler TestHooks::init::first

Now the server starts.

The second problem is this. bleadperl fails to load any test response 
handler modules that do any import() calls. e.g. trying

   % t/TEST modperl/readline

fails to load Apache::Test as it borks on the first symbol 'ok', when doing:

use Apache::Test;

which imports all the EXPORT symbols, starting with the symbol 'ok'.

So we get:

Modification of a read-only value attempted at 
/home/stas/perl/ithread/lib/5.7.2/Exporter.pm line 51.

Just before the offending code I've dumped the value of the symbol:

   require Devel::Peek;
   warn(Devel::Peek::Dump($_[0])) if @_;
   $_[0] =~ /\W/;

so it prints:

SV = PV(0x9068f68) at 0x9069994
   REFCNT = 1
   FLAGS = (POK,pPOK)
   PV = 0x84d4138 "ok"\0
   CUR = 2
   LEN = 3

but it fails to perform:

     $_[0] =~ /\W/;

Any ideas why? If I skip this check in Exporter, it proceeds to fail in 
XSLoader with a similar problem of 'read-only' value's modification.

Again this works with 5.6.1. Seems like a bug in bleadperl, which 
happens only under worker mpm.

Thanks!
_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Mime
View raw message