> I have 2 modules :
> -----------------
> package ThingA;
> 
> use ThingB;
> 
> sub new ....
> 
> sub ThingB { ThingA::ThingB->new( @_ ) }
> 
> ---------------
> 

> package ThingB;
SHOULD BE:
package ThingA::ThingB;
(see below for reason)

> @ThingA::ThingB::ISA = qw(ThingA);
> 
> sub new {
>   my ($class,$thinga,$id) = @_;
>   $self = {};
>   bless $self,$class;
> 
>   $self->{'THINGA'} = $thinga;
>   $self;
> }
> ---------------

The sub ThingB() in package "ThingA" calls the sub new() in package
"ThingA::ThingB".  However, there is no new() in that package since
"ThingA::ThingB" isa "ThingA", so the new() in package "ThingA" is
called.  Presumably, the new() in package "ThingA" calls the sub
ThingB(), causing endless recursion.

So, either fix the package as shown, or change both occurance of
"ThingA::ThingB" to "ThingB".

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