in reply to multiple packages in one file and subroutine redefined warnings

The problem is that base automatically loads the file for you. Since you've named the file X.pm, it gets loaded from itself as it were. Just don't use base when you've put the base class in the same file, but rather modify @ISA yourself.

Replies are listed 'Best First'.
Re: Re: multiple packages in one file and subroutine redifned warnings
by dcvr69 (Beadle) on May 18, 2004 at 18:24 UTC
    Doh. That's too easy. ;)

    Guess I'll make a stab at a patch to the Class::DBI docs to mention that little fact, since they're fond of using examples with multiple packes in the same file - just without any sub definitions. :)

    Well, the patch should be pretty easy: add a $VERSION to your base class if you don't want 'sub redef' warnings.