in reply to Calling chains, extends, and subclassing
First, never say new SomeClass in OO code. You can usually get away with it when writing non-OO code that merely uses OO code but you're really asking for trouble when you do it in an OO module. The problem is that if you say new Whatever in some class like Question you mean Whatever->new but if your local Question->new is already defined by the time you write the above line then you really get Question->new instead. It's 100% a bug on your part and you should never do this.
Secondly, use Ovid's aliased module to get short names. Recommend it to your users. Then they can have short names too without any extreme hacks to ISA.
use aliased 'NHB::QuizMaster::Custom::NHMCCD::Quiz'; use aliased 'NHB::QuizMaster::Custom::NHMCCD::Question'; use aliased 'NHB::QuizMaster::Custom::NHMCCD::Answer'; # Now use the Quiz->, Answer->, Question-> namespaces.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Calling chains, extends, and subclassing
by EvanCarroll (Chaplain) on Oct 04, 2006 at 15:02 UTC | |
by diotalevi (Canon) on Oct 04, 2006 at 15:53 UTC | |
by EvanCarroll (Chaplain) on Oct 04, 2006 at 17:07 UTC |