NAME
Business::RO::CIF - Romanian CIF validation
VERSION
version 0.005
SYNOPSIS
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;
DESCRIPTION
Romanian CIF (ro: Cod de Identificare Fiscală; en: Tax Identification Code) validation.
ATTRIBUTES
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.
METHODS
valid
The valid
method implements the validation algorithm for the Romanian CIF.
Returns 1 if the CIF is valid and 0 otherwise.
BUILDARGS
Override BUILDARGS
to also allow a single value parameter and remove the country code (RO) if present.
BUGS
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.
SUPPORT
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
Search CPAN
SEE ALSO
Other module(s) in the same namespace:
ACKNOWLEDGEMENTS
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.
AUTHOR
Ștefan Suciu <stefan@s2i2.ro>
COPYRIGHT AND LICENSE
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.