Oh, actually do you mean it is the same at:

pageage LTest;

BEGIN {require Test2}
BEGIN { warn "....." }

print "Here\n"

1;

Ok, that kind'a make sence..

Cheers

Leo <- who is slowly getting there.


On Thu, Mar 08, 2001 at 02:52:48PM +0000, Leo Lapworth wrote:
> On Thu, Mar 08, 2001 at 02:59:27PM +0000, Robert Price wrote:
> > I think the answer is that both the modules where the BEGINS are called
> > twice have "use" in them. "use" means "BEGIN {require Module}", so BEGIN is
> > being called once when the module is entered, and once when it is used. 
> > 
> > Rob
> > 
> - SNIP -
> 
> Fraid not.. tried moving the use out of the BEGIN before and it
> made no difference:
> 
> package LTest;
> 
> use Test2;
> 
> BEGIN {
>         warn "Test is beginning\n";
> }
> 
> print "Here\n";
> 
> 1;
> 
> 
> Thanks
> 
> Leo
> 

Reply via email to