CC: | "Bryan H. Apple" <Bryan.Apple [...] recall.com> |
Subject: | Bug in FileHandle::Ungetc Ver. 0.16.22 on line 394 |
Date: | Fri, 7 Aug 2009 15:42:52 -0400 |
To: | bug-FileHandle-Unget [...] rt.cpan.org |
From: | Bill Nugent <whn [...] lopi.com> |
Howdy,
Wonderful module but unfortunately I found a bug while reading the
output from the program pdftotext. I have a pdf file than has as the
last page an image so the program is printing out two formfeeds ('0x0c')
as the last two characters. FileHandle::Unget gets confused.
Included is a short perl program and a text file that tickles this bug.
One way to fix this bug is to change line 392 from:
else
to:
elif (defined $template)
which eliminates the attempt to append the $templine which has an undef
value because the file has reached the end. I've included a patch.
Thank you,
Bill
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.
Message body is not shown because sender requested not to inline it.