in reply to Re: Dealing with abstract methods in Perl 5.8
in thread Dealing with abstract methods in Perl 5.8
Yes, that is true: the solution relies on having the subclasses at least to execute the parent class DESTROY method though SUPER. Using DESTROY was my best bet because of classes like Class::Accessor that creates code during execution phase. Honestly, I don't know if CHECK and/or END blocks manipulation will not broke code generators more than using DESTROY method...
But iterating all over packages looking for methods that were not override looks like a bit overkill, since the parent class already knows which abstract methods it has. Anyway, how would you do it? I mean, how to mark an method as abstract? Or do you mean to really start checking every package for a "@abstract_methods" (or anything else) available as an indication this class must be checked?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Dealing with abstract methods in Perl 5.8
by samtregar (Abbot) on Apr 24, 2007 at 18:44 UTC | |
by glasswalk3r (Friar) on Apr 24, 2007 at 19:13 UTC | |
by samtregar (Abbot) on Apr 25, 2007 at 16:55 UTC |