Skip Menu |

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

Report information
The Basics
Id: 122750
Status: resolved
Worked: 2 hours (120 min)
Priority: 0/
Queue: Digest-SHA

People
Owner: mshelor [...] cpan.org
Requestors: chris [...] chrisdavid.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 5.97



Subject: feature request for Digest SHA
Date: Tue, 8 Aug 2017 21:15:13 -0700
To: bug-Digest-SHA [...] rt.cpan.org
From: Chris David <chris [...] chrisdavid.com>
Hi, This is not a bug really, just a feature request. I have attached a patch that includes the feature. I have tested this on Digest-SHA-5.95. The patch is intended for 5.96. Use Case: I was using the shasum program on Debian Linux to checksum and validate contents of thousands of files. When I use -c option to validate this many files, I would like to only see problems, and silence all the OK messages for the files that pass. md5sum for example has a similar feature IIRC. I modified the shasum program to implement a -q / --quiet option which silence's the OK messages for each file, but nothing else. This worked well for my use case. Please consider using this patch or implementing something similar. I officially declare that the attached patch is solely my own work, and I license it using any license Perl or CPAN module has ever been licensed with, recipients choice exactly which one. Thanks, -Chris David

Message body is not shown because sender requested not to inline it.

On Wed Aug 09 00:15:42 2017, chris@chrisdavid.com wrote: Show quoted text
> Hi, > > This is not a bug really, just a feature request. I have attached a patch > that includes the feature. I have tested this on Digest-SHA-5.95. The > patch is intended for 5.96. > > Use Case: > I was using the shasum program on Debian Linux to checksum and validate > contents of thousands of files. When I use -c option to validate this many > files, I would like to only see problems, and silence all the OK messages > for the files that pass. md5sum for example has a similar feature IIRC. > > I modified the shasum program to implement a -q / --quiet option which > silence's the OK messages for each file, but nothing else. This worked > well for my use case. > > Please consider using this patch or implementing something similar. I > officially declare that the attached patch is solely my own work, and I > license it using any license Perl or CPAN module has ever been licensed > with, recipients choice exactly which one. > > Thanks, > > -Chris David
This is a good suggestion. Both md5sum and sha1sum from GNU's coreutils offer a --quiet option. So should shasum. Thanks for the patch, and for mimicking the style of shasum. I might not duplicate your code exactly, but will certainly give you credit in the Changes and Acknowledgements. Since this is a feature request and not an actual bug report, I will assign the severity level accordingly. The next version of Digest::SHA will offer this feature, but might not be forthcoming for a while. Regards, Mark
Subject: Re: [rt.cpan.org #122750] feature request for Digest SHA
Date: Wed, 9 Aug 2017 11:34:19 -0600
To: bug-Digest-SHA [...] rt.cpan.org
From: Chris David <chris [...] chrisdavid.com>
Awesome! thank you. And thank you for writing and maintaining Digest::SHA in the first place! On Wed, Aug 9, 2017 at 10:33 AM, Mark Shelor via RT < bug-Digest-SHA@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=122750 > > > On Wed Aug 09 00:15:42 2017, chris@chrisdavid.com wrote:
> > Hi, > > > > This is not a bug really, just a feature request. I have attached a
> patch
> > that includes the feature. I have tested this on Digest-SHA-5.95. The > > patch is intended for 5.96. > > > > Use Case: > > I was using the shasum program on Debian Linux to checksum and validate > > contents of thousands of files. When I use -c option to validate this
> many
> > files, I would like to only see problems, and silence all the OK messages > > for the files that pass. md5sum for example has a similar feature IIRC. > > > > I modified the shasum program to implement a -q / --quiet option which > > silence's the OK messages for each file, but nothing else. This worked > > well for my use case. > > > > Please consider using this patch or implementing something similar. I > > officially declare that the attached patch is solely my own work, and I > > license it using any license Perl or CPAN module has ever been licensed > > with, recipients choice exactly which one. > > > > Thanks, > > > > -Chris David
> > > This is a good suggestion. > > Both md5sum and sha1sum from GNU's coreutils offer a --quiet option. So > should shasum. > > Thanks for the patch, and for mimicking the style of shasum. I might not > duplicate your code exactly, but will certainly give you credit in the > Changes and Acknowledgements. > > Since this is a feature request and not an actual bug report, I will > assign the severity level accordingly. The next version of Digest::SHA > will offer this feature, but might not be forthcoming for a while. > > Regards, Mark > > > >
The -q/--quiet option for shasum is now in effect as of v. 5.97. Mark