Skip Menu |

This queue is for tickets about the WWW-FastPass CPAN distribution.

Report information
The Basics
Id: 69407
Status: resolved
Priority: 0/
Queue: WWW-FastPass

People
Owner: Nobody in particular
Requestors: sthoenna [...] gmail.com
Cc:
AdminCc:

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



Subject: Digest::SHA unnecessarily required
Since Net::OAuth will already be using Digest::SHA1, it would be nice if WWW::FastPass used that rather than Digest::SHA (which isn't a core module in 5.8.x, so is an extra dependency there).
From: sthoenna [...] gmail.com
Patch attached.
Subject: fastpass_sha1.patch
diff -ur WWW-FastPass.orig/lib/WWW/FastPass.pm WWW-FastPass/lib/WWW/FastPass.pm --- WWW-FastPass.orig/lib/WWW/FastPass.pm 2011-01-17 16:04:24.000000000 -0800 +++ WWW-FastPass/lib/WWW/FastPass.pm 2011-07-11 16:14:31.438337337 -0700 @@ -4,7 +4,7 @@ use strict; use warnings; -use Digest::SHA qw(sha1_base64); +use Digest::SHA1 qw(sha1_base64); use Net::OAuth; our $VERSION = '0.01'; @@ -61,7 +61,7 @@ request_method => 'GET', signature_method => 'HMAC-SHA1', timestamp => time(), - nonce => Digest::SHA::sha1_base64(time() . $$ . rand()), + nonce => sha1_base64(time() . $$ . rand()), callback => 'oob', extra_params => \%extra_params ); diff -ur WWW-FastPass.orig/Makefile.PL WWW-FastPass/Makefile.PL --- WWW-FastPass.orig/Makefile.PL 2011-01-17 16:13:54.000000000 -0800 +++ WWW-FastPass/Makefile.PL 2011-07-11 16:16:13.450349193 -0700 @@ -4,9 +4,9 @@ WriteMakefile( NAME => 'WWW::FastPass', VERSION_FROM => 'lib/WWW/FastPass.pm', - PREREQ_PM => { 'Net::OAuth' => 0, - 'Digest::SHA' => 0, - 'URI' => 0, }, + PREREQ_PM => { 'Net::OAuth' => 0, + 'Digest::SHA1' => 0, + 'URI' => 0, }, ($] >= 5.005 ? (ABSTRACT_FROM => 'lib/WWW/FastPass.pm', AUTHOR => 'Tom Harrison <tomh5908@gmail.com>') : ()),
Thanks for this, incorporated into 0.02. Cheers -Tom
From: sthoenna [...] gmail.com
On Mon Jul 11 20:21:34 2011, TOMHRR wrote: Show quoted text
> Thanks for this, incorporated into 0.02.
Thanks for the quick response! + - Incorporated patch from sthoenna@gmail.com to use Digest::SHA1, + instead of Digest::SHA, since the former is core and is already a + dependency of Net::OAuth. Just to be clear: Digest::SHA1 is not core, just already a dependency of Net::OAuth. Digest::SHA is core as of 5.9.3, but not earlier, so my change is only to reduce the dependencies for people using 5.8.8 or 5.8.9.
Ugh, don't know how I managed that :). 0.03 amends the comment for 0.02, thanks again. Cheers -Tom On Tue Jul 12 17:04:39 2011, http://ysth.livejournal.com/ wrote: Show quoted text
> On Mon Jul 11 20:21:34 2011, TOMHRR wrote:
> > Thanks for this, incorporated into 0.02.
> > Thanks for the quick response! > > + - Incorporated patch from sthoenna@gmail.com to use Digest::SHA1, > + instead of Digest::SHA, since the former is core and is
already a Show quoted text
> + dependency of Net::OAuth. > > Just to be clear: > > Digest::SHA1 is not core, just already a dependency of Net::OAuth. > > Digest::SHA is core as of 5.9.3, but not earlier, so my change is only > to reduce the dependencies for people using 5.8.8 or 5.8.9.