I don't think that this is a mod_perl related problem because:

When loading files using require perl remembers that it had already
included them and does not load them once more.

I'd guess that calls 3,4,5 are handled by a Apache-child's 1/2 which
have already loaded the required file.

If you really need to require the file everytime you have 2
possibilities:
      * using "do" to load the file
      * delete loaded file from %INC and using require

Tom

On Sat, 2003-12-27 at 12:59, gerard uolaquetalestem wrote:
> Hi, i don't have the last modperl version installed, and i know that maybe it 
> corrects my
> problem, but before starting a so tedious process (for many reasons) i just wanted 
> to ask
> if there is any known problem about it or if it is the normal behaviour of modperl 
> with
> perl require function.
> 
> My version:
> Apache/2.0.47 (Win32) mod_perl/1.99_10-dev Perl/v5.8.0
> 
> This is my strange problem.
> I had a handler that
> - read an archive
> - fill an anon hash with that info
> And now i have changed with a handler that
> - require a file that has the own struct there.
> 
> This is the code:
> $obj->debug('START');
> $dir = {};
> $dir->{red} = 'A';
> require 'file.extension';
> $dir->{lastPost} = 'B';
> $obj->debug('dom is '.$dir->{dom});
> 
> where file.extension is
> $dir->{dom} = 'C';
> $obj->debug('INSIDE');
> 
> The strange thing is that, the archive made by $obj->debug show the nex, after 5
> executions of the code:
> START
> INSIDE
> dom is B
> 
> START
> INSIDE
> dom is B
> 
> START
> dom is 
> 
> START
> dom is 
> 
> START
> dom is 
> 
> So only the two first really "requires" the file, but from there the file is no more
> "executed".
> 
> Is that a known issue about mp2?? anything related with require??
> I've tried to look into the mailists but i've found nothing about it, the same with 
> google.
> 
> Thanks for all.
> -----
> 
> Qu te traer el 2004? No te quedes con la duda Descubrel en nuestro Tarot!: 
> http://rappelweb.mujeractual.com/tu_horoscopo/zodiaco.htm
> Ya.com ADSL:Router 3Com Wireless 11g + 1Mes + Alta Gratis 
> http://acceso.ya.com/adsl/256router/
-- 
   \\\||///
  \\  - -  //
   (  @ @  )
-oOo--( )--oOo----------------------------------------------------------
                     ___  ___                                tom schindl
      o       __    /  / /           innovative medientechnik planung AG
     / /\/\/ / /   /__/ / __            mailto:[EMAIL PROTECTED]
    / / / / /_/   /  / /___/                        http://www.impire.de
           /                 voice:+43(512)34193431,fax:+43(512)34193420
   Eduard-Bodem-Gasse 6, A-6020 Innsbruck, Austria, Software Engineering
------------------------------------------------------------------------


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to