in reply to Re: XML::Parser Tutorial
in thread XML::Parser Tutorial
Why do you want to subclass it? It works much better as a "has-a" than an "is-a", unless you want to get very cozy from the base class implementation, which is a maze of twisty tiny packages all alike.
Just delegate the methods that you want to provide in your interface, and handle the rest. Make a hash with one of the elements being your "inherited" parser. I believe it's called the "wrapper" pattern, but I don't name my patterns—I just use them!
-- Randal L. Schwartz, Perl hacker
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: XML::Parser Tutorial
by gildir (Pilgrim) on Mar 07, 2001 at 21:40 UTC | |
by Anonymous Monk on Mar 14, 2001 at 15:41 UTC |
In Section
Tutorials