in reply to Extending object you don't create

Acutally while dws has suggested the best alternative for THIS case, I'm interested in what people might think about the following hack for the more general case: If I put my routines in HTML::ElementEx, and that modify the @HTML::Element::ISA array to contain HTML::ElementEx. Comments?

Replies are listed 'Best First'.
Re: Re: Extending object you don't create
by dws (Chancellor) on Feb 28, 2001 at 07:14 UTC
    If your intent is to subclass HTML::Element, then confusing it about what its superclass is will get you into some interesting trouble. Switching out the superclass impacts all subclasses of HTML::Element, one of which is HTML::Parser

    Stick with Plan A.