Algori...M89_001(3pm)
๐ CheckDigits::M89_001 โ the "Algori...M89_001(3pm)" girlies' guide ๐
okay so bestie, welcome to the perl manual page for CheckDigits::M89_001, which is a lil module that computes check digits for a VAT Registration Number (LU). yes, LU as in Luxembourg ๐ฑ๐บ. it's giving niche and it's giving essential, and honestly? we're obsessed.
โจ NAME โจ
CheckDigits::M89_001 โ compute check digits for VAT Registration Number (LU) ๐
๐ฆ SYNOPSIS ๐ฆ
like, here's the whole vibe, verbatim:
use Algorithm::CheckDigits;
$ustid = CheckDigits('ustid_lu');
if ($ustid->is_valid('13669580')) {
# do something
}
$cn = $ustid->complete('136695');
# $cn = '13669580'
$cd = $ustid->checkdigit('13669580');
# $cd = '80'
$bn = $ustid->basenumber('13669580');
# $bn = '136695'
look at that. '136695' goes in, '13669580' comes out. glow up. โจ
๐ธ DESCRIPTION ๐ธ
๐งฎ ALGORITHM โ no cap, it's one step
- The checksum is the whole number taken modulo 89.
that's it. that's the algorithm. one line, ate, no crumbs. ๐ฅ
๐ซถ METHODS
is_valid($number)
Returns true only if $number consists solely of numbers and the last digit is a valid check digit according to the algorithm given above ๐
Returns false otherwise,
complete($number)
The check digit for $number is computed and concatenated to the end of $number.
Returns the complete number with check digit or '' if $number does not consist solely of digits and spaces.
basenumber($number)
Returns the basenumber of $number if $number has a valid check digit.
Return '' otherwise.
checkdigit($number)
Returns the checkdigit of $number if $number has a valid check digit.
Return '' otherwise.
๐ฆ EXPORT
None by default.
(not a single thing gets exported, she's private like that ๐)
๐ AUTHOR ๐
Mathias Weidner, "<mamawe@cpan.org>" โ icon, legend, the moment ๐
๐ SEE ALSO ๐
perlCheckDigitswww.pruefziffernberechnung.de
lowkey a reminder bestie: every value you pass in is treated exactly as described above โ '' comes back whenever the input isn't purely digits (and spaces, where noted). no improvising, no guessing, that's the rule fr fr ๐
and that's the whole page, periodt ๐ this lil manual came from User Contributed Perl Documentation and it's riding with perl v5.36.0, dated 2022-10-13 โ so if you ever need to cite your source, that's the tea ๐โจ
๐ฆ where this page comes from
- ubuntu noble: libalgorithm-checkdigits-perl 1.3.6-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libalgorithm-checkdigits-perl 1.3.6-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libalgorithm-checkdigits-perl 1.3.6-2 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms