in reply to XML::Twig error reporting
I think this information is lost when parsing a structured data format like XML, but I wonder what's in $.? If XML::Twig is parsing data from an input file, and these handlers are called as it's reading data, $. should be set with the current line number (where the closing tag lives). If it reads the data in first, though, you're out of luck.