Encoding string This will change the default encoding from UTF-8 to anything you like. You should ensure that given data is already in this encoding or provide a Escape hash, to tell YAWriter the recoding. Future versions may use XS to improve this performance bottleneck. Default to undef. The SGML is still wellformed of course, if your SAX events are wellformed.
Most likely place is the encode method, trying to eval undef as a subroutine.
For small documents AsArray may be the fastest method and AsString the easiest one to receive the output of YAWriter. But AsString and AsArray may run out of memory with infinitve SAX streams. Use a self written Output object instead to improve streaming. This extens the Java SAX1.0 specifcation.