Skip Menu |

This queue is for tickets about the XML-Writer CPAN distribution.

Report information
The Basics
Id: 50465
Status: resolved
Priority: 0/
Queue: XML-Writer

People
Owner: Nobody in particular
Requestors: athomason [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.606
Fixed in: 0.610



Subject: $output->print return value is not checked
XML::Writer does not check the return value of calls to $output->print, which may fail. Certainly a subclass of IO::Handle can override print and check the retval itself, but it would be helpful if that wasn't necessary, perhaps with a parameter to ->new to croak on such errors.
I'd implement this by wrapping the output handle, when the flag was passed to new, with a decorator that checked and croaked. It seems like that would be a fairly minimal patch.
The CHECK_PRINT constructor parameter is added in XML::Writer 0.610.