This software automatically fills hash elements according to specified prerequisites through programming.
One of the initial applications of this module was in a server context, where external sources provided responses to various commands. For each request, the server needed to contact several external sources to calculate the appropriate answer. These calculations sometimes resulted in redundant external accesses, thereby increasing response time and server load.
To address this issue, the calculations were rewritten to access a hash instead of the external sources directly, with HashFiller being used to fill the hash as per the calculation requirements. Additionally, the external accesses were enhanced to include more than one choice or rule for each datum, based on whether prerequisites existed in the hash or not.
HashFiller implements a fill() method that executes the rules as specified by the user-defined code references. The module also includes a set of add() and remove() methods that can be used to add or remove sets of rules, respectively. There is also a loop() method that allows users to specify if infinite loops should be avoided. Furthermore, the module offers a method() method that allows users to test if a key exists using defined().
Finally, HashFiller features a dump_r_tree() method that can be used to print the key tree and a stats() method that provides users with statistics about rule invocation. A profile() method is also included that allows for obtaining profiling information about the rules.
Version 1.40: N/A