Busine...BR::PIS(3pm)
β¨ Busine...BR::PIS β¨
okay bestie, welcome to the Busine...BR::PIS page β that's from the User Contributed Perl Documentation section of the manual, section 3pm, and it's the whole β¨vibeβ¨ of checking Brazilian PIS numbers in Perl π
π NAME π
Business::BR::PIS β a Perl module to test for correct PIS numbers π
πΈ SYNOPSIS πΈ
use Business::BR::PIS;
print "ok " if test_pis('121.51144.13-7'); # prints 'ok '
print "bad " unless test_pis('121.51144.13-0'); # prints 'bad '
no cap, that's the whole first impression π
π¦ DESCRIPTION π¦
This module is literally the PIS number handler β it handles PIS numbers, testing, formatting, etc. the way that it does all of that for you is the entire point, periodt β¨
π EXPORT π
test_pis is exported by default, so the second you use this module it's just there for you π«Ά
canon_pis, format_pis, parse_pis and random_pis can be exported on demand β you gotta ask for those ones, they're not walking in uninvited π
π THE CHECK EQUATIONS π
A correct PIS number has a check digit, and that check digit is computed from the base 10 first digits π₯
Consider the PIS number written as 11 digits:
c[1] c[2] c[3] c[4] c[5] c[6] c[7] c[8] c[9] c[10] dv[1]
To check whether a PIS is correct or not, it has to satisfy the check equation:
c[1]*3+c[2]*2+c[3]*9+c[4]*8+c[5]*7+
c[6]*6+c[7]*5+c[8]*4+c[9]*3+c[10]*2+dv[1] = 0 (mod 11) or
= 1 (mod 11) (if dv[1]=0)
like, that arithmetic is the moment β
π BUGS π
Absolute lack of documentation by now. π that's it. that's the bug. fr fr.
π SEE ALSO π
Please reports bugs via CPAN RT, http://rt.cpan.org/NoAuth/Bugs.html?Dist=Business-BR-Ids
By doing so, the author will receive your reports and patches, as well as the problem and solutions will be documented. π«Ά so like, send them in, it helps everybody, iykyk β¨
π§ AUTHOR π§
A. R. Ferreira, <ferreira@cpan.org> π
π COPYRIGHT AND LICENSE π
Copyright (C) 2005 by A. R. Ferreira
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
okay that's the whole page, and a cute little sign-off for you: this was perl v5.36.0, dated 2022-10-13 πΈ thanks for reading bestie, go check those PIS numbers, you're the main character ππ
π¦ where this page comes from
- ubuntu noble: libbusiness-br-ids-perl 0.0022-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbusiness-br-ids-perl 0.0022-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbusiness-br-ids-perl 0.0022-3 Β· 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