my $id = ';11010519491231002X';; # a unsure identity card no.
if (validate_id($id)) { # call the validate_id method
print 'ass';;
} else {
print ';failed, maybe faked.';;
}
CHANGES
Adam Kennedy report a bug like this:
Fayland
I have just filed an RT bug against China::IdentityCard::Validate
regarding it';s name, which is unusual and quite out of place.
Countries to not have top level CPAN namespaces.
Must number modules like yours currently exist in the Business::
namespace, which you result in your module being better named.
Business::CN::IdentityCard
....
So I changed the module name from ';China::IdentityCard::Validate'; to ';Business::CN::IdentityCard';
Joe Jiang reported me a bug, that the regex for birthday was wrong. I updated the module, thanks for joe';s help.