> > exported variables from modules lose their value after the first run.
> > This appears similar to an old post
>
> > package test2;
> > [...]
> > BEGIN {
> > # use vars qw($TEST);
> > use Exporter ();
> > @test2::ISA = qw(Exporter);
> > @test2::EXPORT = qw();
> > @test2::EXPORT_OK = qw($TEST &runit);
> > }
> > [...]
>
> Under mod_perl, BEGIN blocks only get executed once per child.
> Therefore, the variables are only exported in the first run.
> Just move the content of the BEGIN block outside of the block
> as follows:
I think this statement is not absolutely correct. Saying "under mod_perl"
is too general, since BEGIN/END blocks are used differently with registry
scripts vs non-registry, so if you are talking about PerlRun -- BEGIN
blocks are reevaluated on every invocation. See:
http://perl.apache.org/guide/porting.html#BEGIN_blocks
http://perl.apache.org/guide/porting.html#END_blocks
> > Is this [...] A bug?
>
> no. This problem is not related to PerlRun or the flushing of the name
> space; the problem would also occur if one tried to use the module from
> two different scipts/modules (in the same child).
Truth, see:
http://perl.apache.org/guide/porting.html#Name_collisions_with_Modules_and
_______________________________________________________________________
Stas Bekman mailto:[EMAIL PROTECTED] http://www.stason.org/stas
Perl,CGI,Apache,Linux,Web,Java,PC http://www.stason.org/stas/TULARC
perl.apache.org modperl.sourcegarden.org perlmonth.com perl.org
single o-> + single o-+ = singlesheaven http://www.singlesheaven.com