> 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:

package test2;
[...]
# use vars qw($TEST);
use Exporter ();
@test2::ISA = qw(Exporter);
@test2::EXPORT = qw();
@test2::EXPORT_OK = qw($TEST &runit);
[...]

or:

package test2;
[...]
{
#       use vars qw($TEST);
        use Exporter ();
        @test2::ISA = qw(Exporter);
        @test2::EXPORT = qw();
        @test2::EXPORT_OK = qw($TEST &runit);
}
[...]


> 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). 

ELB

--
Eric L. Brine  |  Chicken: The egg's way of making more eggs.
[EMAIL PROTECTED]  |  Do you always hit the nail on the thumb?
ICQ# 4629314   |  An optimist thinks thorn bushes have roses.

Reply via email to