Skip Menu |

This queue is for tickets about the Digest-SHA CPAN distribution.

Report information
The Basics
Id: 19641
Status: resolved
Estimated: 45 min
Worked: 45 min
Priority: 0/
Queue: Digest-SHA

People
Owner: mshelor [...] cpan.org
Requestors: william [...] knowmad.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 5.38
Fixed in: 5.41



Subject: addfile function change breaks PAR
Hi Mark, A recent change in Digest::SHA has caused PAR to break at line 489 in PAR.pm. This has been reported to the PAR list as bug #19627. I think the bug lies in your module which has changed the functionality of addfile. The following line looks suspect to me where the $file is being turned into a reference before being evaluated. if (ref(\$file) eq 'GLOB') { return(_addfile($self, $file)) } In my tests, this is always causing the ref to be REF, not GLOB. Let me know if you need more information. Thanks, William
On Thu Jun 01 11:52:00 2006, guest wrote: Show quoted text
> Hi Mark, > > A recent change in Digest::SHA has caused PAR to break at line 489 in > PAR.pm. This has been reported to the PAR list as bug #19627. I think > the bug lies in your module which has changed the functionality of > addfile.
Yes, you're correct. Unfortunately, an implementation bug crept in during the recent expansion of the addfile interface. This has been fixed in version 5.40, which now includes a specific test case for indirect filehandles (ref. t/2-nist-sha-oo.t). Note that the addfile functionality has not been changed per se, but merely expanded. It is fully backwards compatible with all previous versions of addfile (when correctly implemented, that is :) Mark
RT-Send-CC: mshelor [...] cpan.org
Fixed in version 5.40. The problem arose from addfile's failure to check for an indirect filehandle being passed in through the first argument; rather, it checked only for a typeglob and otherwise assumed that a file name was being passed in. As of version 5.40, addfile checks for indirect filehandles as well as typeglobs. A test case has been added to "t/2-nist-sha-oo.t" to verify correct behavior. Mark
On Fri Jun 02 18:17:00 2006, MSHELOR wrote: Show quoted text
> Fixed in version 5.40. > > The problem arose from addfile's failure to check for an indirect > filehandle being passed in through the first argument; rather, it > checked only for a typeglob and otherwise assumed that a file name was > being passed in. > > As of version 5.40, addfile checks for indirect filehandles as well as > typeglobs. A test case has been added to "t/2-nist-sha-oo.t" to verify > correct behavior. > > Mark
Even though version 5.40 corrects the addfile problem for PAR, it doesn't completely resolve the underlying problem; other types of indirect filehandles (e.g. refs to IO::File) are still not handled properly. Please refer to version 5.41 for a more general resolution of the problem. Mark