logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

IO::Digest - Calculate digests while reading or writing

Authors

       Chia-liang Kao <clkao@clkao.org>

Description

       This module allows you to calculate digests while reading or writing file handles.  This avoids the case
       you need to reread the same content to compute the digests after written a file.

Name

       IO::Digest - Calculate digests while reading or writing

Synopsis

        use IO::Digest;

        # Get a Digest::MD5 object that takes input while $fh being written or read
        my $fh;
        my $iod = IO::Digest->new ($fh, 'MD5');

        print $fh "fooo";
        print $iod->hexdigest

Test Coverage

        ----------------------------------- ------ ------ ------ ------ ------ ------
        File                                  stmt branch   cond    sub   time  total
        ----------------------------------- ------ ------ ------ ------ ------ ------
        blib/lib/IO/Digest.pm                100.0    n/a    n/a  100.0  100.0  100.0
        Total                                100.0    n/a    n/a  100.0  100.0  100.0
        ----------------------------------- ------ ------ ------ ------ ------ ------

See Also