well, i agree, but i could not find a way to do it otherwise. when pike compiles the classes, the source gets thrown away. so unless it is cought at that point it is lost, and no docs can be extracted.
the code only keeps the source it it is not coming from a file. (otherwise it just stores the filename)
the actual extraction of docs does not hapen until it is requested through show_doc()
i did not find a way to control whether docs should be available or not, early enough in the process to not lose some docs. even a comandline swich does not get processed early enough it seems, let alone anything defined in a users main class.
i am aware that this code is not the final solution, but i wanted to put it in because it works and also to get a discussion base to improve on it.
there is definetly much room for improvement.
greetings, martin.