I'm guessing that you may be running into a buffering bug in XML::SAX::PurePerl. Try installing the XML::SAX::Expat module which will then be used instead of the PurePerl parser.
If that doesn't work then try and provide the smallest test data that exposes the bug.
PS: www.perlmonks.org is a better place for asking questions like this
(10)
]
