in reply to XML::Twig - bug or something else?

It's a bug: when the root triggers are never activated, then the root end tag gets output twice. It's caused by the new code that makes the final flush optional (as long as flush has been called at least once during parsing). It seemed to be a common mistake, so I tried preventing it from happening.

The development version on the XML::Twig site is fixed (but I haven't added a test yet).