.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Business::BR::Ids 3pm" .TH Business::BR::Ids 3pm "2021-01-02" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Business::BR::Ids \- Modules for dealing with Brazilian identification codes (CPF, CNPJ, ...) .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 5 \& use Business::BR::Ids; \& my $cpf = \*(Aq390.533.447\-05\*(Aq; \& print "ok as CPF" if test_id(\*(Aqcpf\*(Aq, $cpf); \& my $cnpj = \*(Aq90.117.749/7654\-80\*(Aq; \& print "ok as CNPJ" if test_id(\*(Aqcnpj\*(Aq, $cnpj); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is a generic module for handling the various supported operations on Brazilian identification numbers and codes. For example, it is capable to test the correctness of \s-1CPF, CNPJ\s0 and \s-1IE\s0 numbers without the need for explicitly 'requiring' or \&'using' this modules (doing it automatically on demand). .IP "\fBtest_id\fR" 4 .IX Item "test_id" .Vb 2 \& test_id($entity_type, @args); \& test_id(\*(Aqcpf\*(Aq, $cpf); # the same as "require Business::BR::CPF; Business::BR::CPF::test_cpf($cpf)" .Ve .Sp Tests for correct inputs of ids which have a corresponding Business::BR module. For now, the supported id types are 'cpf', 'cnpj', 'ie', and 'pis'. .IP "\fBcanon_id\fR" 4 .IX Item "canon_id" .Vb 1 \& canon_id($entity_type, @args) .Ve .Sp Transform the input to a canonical form. The canonical form is well-defined and as short as possible. For instance, \f(CW\*(C`canon_id(\*(Aqcpf\*(Aq, \*(Aq29.128.129\-11\*(Aq)\*(C'\fR returns \f(CW\*(Aq02912812911\*(Aq\fR which has exactly 11 digits and no extra character. .SS "\s-1EXPORT\s0" .IX Subsection "EXPORT" \&\f(CW\*(C`test_id\*(C'\fR is exported by default. \f(CW\*(C`canon_id\*(C'\fR, \f(CW\*(C`format_id\*(C'\fR, \&\f(CW\*(C`parse_id\*(C'\fR and \f(CW\*(C`random_id\*(C'\fR are exported on demand. .SH "SEE ALSO" .IX Header "SEE ALSO" Details on handling \s-1CPF, CNPJ, IE\s0 and \s-1PIS\s0 can be found in the specific modules: .IP "\(bu" 4 Business::BR::CPF .IP "\(bu" 4 Business::BR::CNPJ .IP "\(bu" 4 Business::BR::IE .IP "\(bu" 4 Business::BR::PIS .PP Please reports bugs via \s-1CPAN RT,\s0 http://rt.cpan.org/NoAuth/Bugs.html?Dist=Business\-BR\-Ids .SH "AUTHOR" .IX Header "AUTHOR" A. R. Ferreira, .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" Copyright (C) 2005\-2007 by A. R. Ferreira .PP This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.