next up previous contents index
Next: The Patient Module Up: The Perl modules Previous: Perl subroutines

The Module's General Structure

All rewritten modules share the same general structure. First, all needed information is extracted from the dBASE  files, and stored in some hashes . This is done even if this information needs several megs of memory, because UNIX  will start to swap if it runs out of memory. In this case, it is still much more effective than a user program which accesses the files a second time.

Next, the desired output is computed and stored in another hash with the according period of time as its key. Finally, the output is produced either on the screen so that a user can easily read it, or as a file dBASE can import. The desired output format can be set by a parameter given to the according main module. If the parameter dbf is used, the output will be written into a file with the same name dBASE uses in the same function. If the parameter is omitted, the output will be printed on the screen.



Ingo Melzer
Mon Aug 5 15:12:01 MET DST 1996