in reply to XML-Twig

The only thing I can think is that ParseStream is undefined.
Urm... I don't think so. Let me tell you that I'm just guessing... It looks to me like ParseStream is defined in XML/Parser/Expat.xs, the C bind layer between plain Perl and the C library. At least I can see this in there:
int XML_ParseStream(parser, ioref, delim) XML_Parser parser SV * ioref SV * delim CODE: ...

What I think, is that ParseStream() needs a callback for each "event". That means that this function calls some plain Perl subs. And I think that there is where something goes wrong. Perhaps it simply misses a proper callback sub.

Could you make a small XML file available, that is compatible with your program, and which exhibits the problem? That way, I, and maybe some other people here as well, could play a little with your program.