in reply to package Foo; isa Bar; why not?
FWIW, if it weren't for the syntactic/parser limitations that go with indirect object syntax, there have been several situations were I would have liked to have used it. I'm kinda hoping that the P6 syntax definitions will be more precise, and will subsequently allow it's use safely, assuming that it will still be there after Apo-12.
For your isa module, it seems almost too trivial as it is to be worth making it a module. However, I think that your right about use base;, and there are various other OO utility modules around that provide some things which are useful and bits which I think are redundant. It would be nice to sort out a set of useful, lightweight, general purpose extensions to the standard perl OO and put them together, as a single pragma.
It would probably be best if it was possible to get a collective opinion on what people would like to see (that is practical and simple and lightweight) to "clean-up" the current unenhanced state of P5's OO.
There are already a large number of OO enhancement modules on CPAN, but they overlap a lot, each has some good bits and some bad bits. Many of them cannot be used together because of design, implementation or methodology conflicts.
In the same way that there was a project to clean up, simplify and coalese the various Date and Time modules kicking around that resulted in DateTime. A similar project would be beneficial to the whole arena of perl's OO -- I think.
|
|---|