duckduckgo/p5-app-duckpan — pull request #175 by mwmiller (2014-11-17 12:28:43+00:00)
Title: Code Reload.

This makes code reloading available. This was not as easy as one might hope, given the inside-out way we do things with our object construction. For these reasons, this code depends on [a change to DDG](https://github.com/duckduckgo/duckduckgo/pull/106) and isn't as efficient as it might otherwise be. Hopefully still more efficient than stopping and restarting the server constantly.

- `ia_type` and `all_module` list are changed into attributes.
- The all_module list is cleared if we note a modification since last check.
- Otherwise, the module list is scanned and and reloaded as necessary via the `again` module.
- If any changes are noted, we regenerate the blocks.

Essentially all of the above is done in a closure which is passed to each blocks users (Server and Query) so that they can get the updated blocks at the appropriate times.

This has been manually tested to cover adding, removing and modifying packages while the process is running.