a way of implementing an interface in a fool proof fashion with compile time enforcement on required virtual methods
Frankly that sounds like you should re-examine your requirements. Compile-time checking on including specific methods is likely to be nearly a joke in Perl, IMO, because in Perl an "interface" is simply the name of the method. Checking that you got the name of the method right seems a pretty hollow insurance policy and not something I'd call "fool-proof".
I'd be more impressed with tests that verify more than just the names of the methods and would run those tests before checking code in rather than jump through hoops trying to test at compile time.
- tye
In reply to Re: How best to implement multiple interfaces in perl (fools)
by tye
in thread How best to implement multiple interfaces in perl
by starbuck
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |