Global variable `%D` was used to keep a per-instance state (but also prevented per-instance callbacks). Replacing XML::Twig callbacks with subs calling instance methods allows using the object itself to store this state info instead. Also eliminated obsolete "use vars" in favor of "our" declaration (valid since 5.6.0, March 2000)
1. Add parsing of NSE scripts' XML output. Structured output is built into a data structure recursively. 2. Fix a warning: Use of uninitialized value in lc (in `_get_ports`) 2. Document `prescripts` and `postscripts` methods of `Nmap::Parser::Session` 3. Add appropriate tests for script functionality.
…ese new functions.