Algorithm-CheckDigits

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

	- Changed description of modules to more meaningful text (at least I
	  hope so).
	- Added plugin interface with examples in t/PluginLib*.pm and
	  t/plugin*.t.

1.2.1 Sun Mar  3 22:51:45 CET 2013
	- changed list items in POD from 0, 1, ... to S<0>, S<1>, ...
	  according to a thread on the perl5 porters list
	  (www.nntp.perl.org/group/perl.perl5.porters/2013/02/msg199355.html)

	  David Wheeler: "Lists must start with 1. When it saw the 0, it
	  assumed it was a definition list, so the numbers after that
	  don't look right."

1.2.0 Fr 8. Jun 11:19:25 CEST 2012
	- reworked Algorithm::CheckDigits::MXX_001.pm, added ABA routing
	  numbers

1.1.2 Fr 8. Jun 09:22:35 CEST 2012
	- added '=encoding iso-8859-1' to M11_004.pm, M11_006.pm,
	  MBase_002.pm, MXX_003.pm, MXX_006.pm. This should prevent

cgi-bin/checkdigits.cgi  view on Meta::CPAN

    if ($cd->is_valid($number)) {
        $ok =  "$number is a valid $algorithm number";
        param('number','');
    }
    else {
        $ok =  "$number is not valid with algorithm $algorithm";
    }
}

print header(),
      start_html(),
      start_form(),
      textfield('number'),
      popup_menu(-name   => 'algorithm',
      		 -values => \@all_algorithms,
		 -labels => \%all_labels),
      submit('check'),
      end_form(),
      $ok,
      end_html(),
      "\n";

lib/Algorithm/CheckDigits/M23_002.pm  view on Meta::CPAN

=head2 ALGORITHM

The irish TIN (Tax Identification Number) or VAT Regstration Number
consists of 7 digits, a letter in the range from 'A' - 'W' as checksum,
and an optionally letter in the range from 'A' - 'I' or the letter 'W'.

=over 4

=item 1

In reverse order, each digit is multiplied by a weight started at 2.
(i.e. the number left from the check digit is multiplied with 2,
the next with 3 and so on).

=item 2

If there is an optional letter following the checksum letter (position 9),
this letter is mapped to a numeric value based on the following mapping:
"A" = 1, "B" = 2, ... "H" = 8, "I" = 9. "W" or absence of this letter
means a value of 0. This numeric value is multiplied with 9.

lib/Algorithm/CheckDigits/MXX_002.pm  view on Meta::CPAN

  
=head1 DESCRIPTION

=head2 ALGORITHM

=over 4

=item 1

Beginning right with the second digit all digits are weighted
ascending starting with 1.

=item 2

The sum of those products is computed.

=item 3

The checksum is the last digit of the sum from step 2 (modulo 10).

=back



( run in 0.418 second using v1.01-cache-2.11-cpan-0d8aa00de5b )