Algorithm-Damm

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Algorithm-Damm

1.001.001   2013/03/17
        Reorder POD sections (fixes #4)

1.001   2013/03/17
        Add more related modules to documentation (Issue #2).

1.000   2013/03/17
        Release of initial implementation of Damm ECC generation.

0.000   2013/03/16
        Internal module generation work

README  view on Meta::CPAN

SYNOPSIS
      use Algorithm::Damm qw/check_digit is_valid/;

      $c = check_digit("43881234567");
      print "It works\n" if is_valid("43881234567$c");

DESCRIPTION
    This module implements the Damm algorithm for calculating a check digit.

    You can find information about the algorithm by searching the web for
    "Damm ECC". In particular, see the "SEE ALSO" section (below).

FUNCTIONS
    is_valid CHECKSUMMED_NUM
        This function returns 1 if the final character of CHECKSUMMED_NUM is
        the correct checksum for the rest of the number, 0 if not, and undef
        if CHECKSUMMED_NUM contains an invalid character or does not contain
        at least two digits (one for the number, and one for the checksum).

        This function is equivalent to

lib/Algorithm/Damm.pm  view on Meta::CPAN


  $c = check_digit("43881234567");
  print "It works\n" if is_valid("43881234567$c");

=head1 DESCRIPTION

This module implements the Damm algorithm for calculating a check
digit.

You can find information about the algorithm by searching the web for
"Damm ECC".  In particular, see the L<SEE ALSO> section (below).

=head1 FUNCTIONS

=over 4

=cut

=item is_valid CHECKSUMMED_NUM

This function returns 1 if the final character of CHECKSUMMED_NUM is



( run in 0.522 second using v1.01-cache-2.11-cpan-39bf76dae61 )