Business::RO::CIF - Romanian CIF validation
version 0.005
use Business::RO::CIF;
my $cif = Business::RO::CIF->new( cif => 123456789 );
or
my $cif = Business::RO::CIF->new( 'RO 123456789' );
say $cif->errstr unless $cif->valid;
Romanian CIF (ro: Cod de Identificare Fiscală; en: Tax Identification Code) validation.
cif
The cif attribute holds the input CIF string. It should contain only Arabic numerals (0-9).
errstr
The errstr attribute holds a message string that describes what part of the validation algorithm failed.
rev_key
The rev_key attribute is a array reference of the validation string, in reverse order.
rev_cif
The rev_cif attribute is a array reference of the input string, without the checksum digit, in reverse order.
checksum
The checksum attribute holds the last character (digit) of the input string.
valid
The valid method implements the validation algorithm for the Romanian CIF.
Returns 1 if the CIF is valid and 0 otherwise.
Override BUILDARGS to also allow a single value parameter and remove the country code (RO) if present.
BUILDARGS
Please report any bugs or feature requests to bug-business-ro-cif at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Business-RO-CIF. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-business-ro-cif at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Business::RO::CIF
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Business-RO-CIF
Search CPAN
http://search.cpan.org/dist/Business-RO-CIF/
Other module(s) in the same namespace:
This project was created with at the initiative and the suggestion made by Árpád Szász.
The module is inspired from the Business::RO::CNP module by Octavian Râșniță (TEDDY).
The validation algorithm is from http://ro.wikipedia.org/wiki/Cod_de_Identificare_Fiscal%C4%83.
Ștefan Suciu <stefan@s2i2.ro>
This software is copyright (c) 2015 by Ștefan Suciu.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Business::RO::CIF, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::RO::CIF
CPAN shell
perl -MCPAN -e shell install Business::RO::CIF
For more information on module installation, please visit the detailed CPAN module installation guide.