P is for Practical | |
PerlMonks |
Abstract class methodsby tilly (Archbishop) |
on Dec 01, 2000 at 04:19 UTC ( [id://44268]=note: print w/replies, xml ) | Need Help?? |
This just hit me as The Right Way To Do This.
The import method will do nothing if you import the base class, but will die a horrible flaming death if you ever use or import a class that inherits from it which does not implement the abstract methods you want. Note that the base class cannot (with this method) define the abstract methods itself, it just lists them. (They could be in an array, etc.)
UPDATE
UPDATE 2
UPDATE 3
In Section
Seekers of Perl Wisdom
|
|