Acrux
view release on metacpan or search on metacpan
lib/Acrux/Digest/Damm.pm view on Meta::CPAN
package Acrux::Digest::Damm;
use strict;
use utf8;
=encoding utf-8
=head1 NAME
Acrux::Digest::Damm - interface for Damm check digit calculation
=head1 SYNOPSIS
use Acrux::Digest::Damm;
my $damm = Acrux::Digest::Damm->new();
my $d = $damm->checkdigit( "123456789" ); # 4
$damm->checkdigit( "123456789$d" ); # 0 - correct
=head1 DESCRIPTION
This is a Digest backend module that provides calculation
of the Damm check digit
=head1 METHODS
This class inherits all methods from L<Acrux::Digest> and implements the following new ones
=head2 checkdigit
See L</digest>
=head2 digest
my $damm = Acrux::Digest::Damm->new();
my $digest = $damm->digest( "123456789" ); # 4
$damm->digest( "123456789$digest" ); # 0 - correct
my $digest = $damm->digest( "987654321" ); # 5
$damm->digest( "987654321$digest" ); # 0 - correct
Returns Damm checkdigit by specified digits-string
See also L<https://en.wikipedia.org/wiki/Damm_algorithm>
=head1 HISTORY
See C<Changes> file
=head1 TO DO
See C<TODO> file
=head1 SEE ALSO
L<Acrux::Digest>, L<https://en.wikipedia.org/wiki/Damm_algorithm>
=head1 AUTHOR
Serż Minus (Sergey Lepenkov) L<https://www.serzik.com> E<lt>abalama@cpan.orgE<gt>
=head1 COPYRIGHT
Copyright (C) 1998-2026 D&D Corporation
( run in 1.808 second using v1.01-cache-2.11-cpan-99c4e6809bf )