Subject: | bug in Imager 0.63 |
Date: | Thu, 17 Apr 2008 03:40:37 +0000 |
To: | bug-Imager [...] rt.cpan.org |
From: | Christian Carey <christianc [...] sitesell.com> |
Hello there,
I believe that I’ve found a bug in Imager 0.63; fortunately, the bug is
easily fixed. Within Imager.pm, in the _get_reader_io and _get_writer_io
subroutines, at lines 1200 and 1251 respectively, is
unless ($fd) {
but these lines ought to be
unless (defined $fd) {
The reason for this is that a zero-value returned from fileno() [at
lines 1199 and 1250 respectively] is a valid file descriptor value.
Since fileno() returns undef rather than zero on a closed filehandle,
the change outlined above should be applied to lines 1200 and 1251, so
that the “Handle in fh option not opened” error is only generated when
the filehandle is actually not open.
Please let me know if you have any questions or concerns with the
proposed fix above. I look forward to the next release of Imager — it
will allow me to finish writing a regression test which depends upon
this bug being fixed!
Thank you,
Christian.
--
Christian Carey
christianc@sitesell.com