in reply to Re: Re^2: subclass discovery at runtime
in thread subclass discovery at runtime

Are you doing it in that order? Because the @ISA = qw(SuperClass); only happens at runtime, and by the time the print executes you haven't yet arrived at it. Wrap it in BEGIN {} and it will work.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re^4: subclass discovery at runtime
by Gilimanjaro (Hermit) on Jan 27, 2003 at 18:11 UTC
    Yep... You're right... I just figured that out... Discovered an issue with recursing thru the namespace too; seems there's a 'main::main::' entry, which causes infinite recursion, so you'd need to keep track of what namespaces you've checked...
      Sort of. There's a main:: in every package; just skip that entry and you'll be fine.

      Makeshifts last the longest.

        Right... Makes sense actually... That way every package can easily access the main package... Ah well... My duplicate-checking code seems to work too... At least I've learnt a bit about the symbol table and such because of this thread... :)