Digest::MD5 ... does not include the functions I am using. ... If I remove the "::File" line I get this error...
I didn't mean that Digest::MD5 is a drop-in replacement for Digest::MD5::File, sorry for the misunderstanding. You would need to use Digest::MD5 according to its documented API. (Digest::MD5::File appears to monkey-patch its functions into Digest::MD5, which probably just adds to the confusion.) For example, here's how you might replace the module's file_md5_hex function:
use Digest::MD5;
sub file_md5_hex {
my $filename = shift;
open my $fh, '<:raw', $filename
or die "open $filename: $!";
my $md5 = Digest::MD5->new->addfile($fh);
close $fh;
return $md5->hexdigest;
}
|