On Wed, Aug 06, 2003 at 01:06:46AM +0900, Marko Schulz wrote:
> I don't really have enough cross-platform knowledge to decide whether
> it is possible; but on the platforms I know, it already seems awkward,
> to detect for sure, whether a file already has been read (maybe
> somebody should look how others do it):

In C, the file itself is responsible for this:

#ifndef _myheader_h
#define _myheader_h
... do stuff
#endif

> Maybe storing a md5sum for each file is enough.

Cool idea, except the cost of reading in a file every time you see
   require 'foo'
means that it would break things. I quite happily put a 'require' buried
inside a loop at the moment, knowing that the library will get read just the
first time it's needed.

Cheers,

Brian.