Subject: | test/hexbin script fails to binmode output FH |
The script in test/ is not installed and not run by the automated test
facilities but seems to be a valuable demonstration of the use of this
library. It contains a coding error which will cause invalid output
when run on a Win/DOS type system: failure to call `binmode' on the
output filehandle. The output file will generally be corrupted as a
result. A patch is attached:
* 01_hexbin_binmode.patch
I'm not perceiving that the original author (Eryq) is still doing
any tasks relating to upkeep of this module (as evidenced by no new
release since 1997, a year-old bug report filed here and so far not
acknowledged, etc). If no action on this bug report takes place within
a reasonable time, I may begin actions to adopt this apparently
orphaned module.
Sören Andersen
Subject: | 01_hexbin_binmode.patch |
*** /tmp/local/build/.cpan/build/Convert-BinHex-1.119/test/hexbin Sun Mar 23 12:58:37 1997
--- /usr/local/build/.cpan/build/Convert-BinHex-1.119/test/hexbin Thu Feb 16 15:28:11 2006
***************
*** 41,50 ****
--- 41,51 ----
# Output data fork:
$fname = "$dir/$name";
print STDERR "Writing $fname (data fork)\n";
printf STDERR "Expecting: %6d bytes\n", $HQX->data_length if $opt_v;
open DATA, ">$fname" or die "open $fname: $!";
+ binmode DATA;
while ($bytes = $HQX->read_data) {
print DATA $bytes;
}
close DATA;
printf STDERR "Wrote: %6d bytes\n", (-s $fname) if $opt_v;