SPUG: Recursive Inheritance?

John Cokos jcokos at ccs.net
Fri Nov 10 09:59:16 CST 2000


I'm getting an odd error from perl...

Here's the error:
Recursive inheritance detected while looking for method 'debug' in package 'iSQL::Record' at IWeb/iSQL/Record.pm line 53

I have a program, that has the following use statements:

use iSQL;
use iSQL::Record;
use iSQL::Record::Campaign;

The object I'm trying to create starts like this:
    my $obj = new iSQL::Record::Campaign;

The iSQL/Record/Campain module only has a few lines in it:
    package iSQL::Record::Campaign;
    @ISA = qw( iSQL::Record iSQL );
    use vars qw($iSQL $DBH $LOGGING $DEBUG_LEVEL $AUTOLOAD);
    1;

The iSQL/Record.pm starts off like this:
    package iSQL::Record;
    @ISA = ( 'iSQL' );
    use vars qw($iSQL $DBH $LOGGING $DEBUG_LEVEL $AUTOLOAD);
    ... methods excluded for space, but there are many methods here, but the one we, via inheritance are calling is "new", which
does exist here.
    Note, that for testing, the "new" routine does it's bless, and then prints "Hello World" and dies.
    The call to "die" (or exit) brings up the error above.  Note that I was working perfectly fine
    until I decided to add the "Campaign" module to the mix, as I want Campaign to be a specific
    type of record, using all of it's methods, but have some additional ones, specific to itself (OOP)....
    Seems that adding that module to the mix, since it has no methods, should make the calls and
    functionality in the main program work exactly as before, with the only real difference being the
    name of the class that ends up being blessed, right?

And the iSQL.pm starts off like this:
    package iSQL;
    use vars qw($iSQL $DBH $LOGGING $DEBUG_LEVEL $AUTOLOAD);
    ... methods excluded for space, but there are many methods here, but the one we, via inheritance are calling is "DEBUG", which
does exist here


The error that I get, according to perldiag indicates that it exhausted over 100 levels of recursion,
but I only defined 3, it would seem .... What, here, is causing that error?

John
========================================
  John Cokos, President / CEO: iWeb Inc.
  http://www.iwebsys.com
  jcokos at ccs.net
========================================



 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/





More information about the spug-list mailing list