in reply to Passing additional arguments to XML::Twig handlers
The best explanation I have seen about closures and how to use them in XML::Twig is Simon Cozens' Achieving Closure.