Skip Menu |

This queue is for tickets about the Algorithm-LUHN CPAN distribution.

Report information
The Basics
Id: 43842
Status: resolved
Priority: 0/
Queue: Algorithm-LUHN

People
Owner: NEILB [...] cpan.org
Requestors: joe.bruni [...] bestwestern.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.01



Subject: documentation problem
Date: Wed, 4 Mar 2009 10:45:38 -0700
To: bug-Algorithm-LUHN [...] rt.cpan.org
From: Joseph Bruni <joe.bruni [...] bestwestern.com>
I believe the documentation for is_valid() is wrong. I don't think you should be appending the calculated check digit to the string prior to calling is_valid(). As written, the example will always succeed regardless of the input. If one is just testing externally supplied numbers (e.g. CC numbers) for validity, it appears that only the CC number needs to be passed to is_valid(). The check digit has already been appended. The check_digit() call would only be useful to create numbers that would pass the is_valid() test. Joe
Download smime.p7s
application/pkcs7-signature 2.4k

Message body not shown because it is not plain text.

I've clarified this bit of the documentation, and added example usage with both valid and invalid card numbers. Thanks, Neil