in reply to Dynamic Config
Some years ago I've written a drop-in replacement for Autoloader and uploaded it as AutoReloader. Something like that can be used for dynamic config changes.
For example, you could tie a configuration hash to a class which runs a check subroutine at every FETCH, checking the timestamp of a config file against the recorded value at tie()-time; If the timestamp is newer, calculate the checksum of the file, reload it in case it differs from the recorded one, and remember the new timestamp (and checksum if reloaded).
The penalty would the overhead of stat and a numeric comparison, in addition to the function call and the overhead of tie.
|
|---|