roxen.lists.pike.general

Subject Author Date
Re: Is there anyway to have a class always be inherited from other Tobias S. Josefowitz <t[dot]josefowitz[at]gmail[dot]com> 10-09-2009
 objects?
2009/9/8 Dino M. Gambone <<dmgambone[at]yahoo.com>>:
> I thought about that, but what about files that have individual class
> definitions in them?  How would that get handled?

I've just written a small replacement master that overloads
compile_string(), searches through it and adds a base-class inherit
into all files and class definitions in them.
It is all but well tested and productive, additionally you can
circumvent the mechanism by using compile(string). Additionally there
may exist lots of problems, I've not yet let it on the loose with
production code.
It does retain line numbers however (for compilation error messages etc.).

Maybe this helps or gives you an impression (if not I still had the
fun of writing it).
http://public.tobij.de/res/plain/baseclass/ (invoke with pike
test.pike test2.pike, as test.pike is a base-class-inserting loader
for other pike scripts).