NAME

Data::Validate::ChineseID - validate Chinese identity card

VERSION

Version 0.01

SYNOPSIS

use Data::Validate::ChineseID;

my $test = Data::Validate::ChineseID->new;
my $re = $test->is_chinese('510522198702097567');

print "the card number is ", $re ? '' : 'not', " a Chinese";

METHODS

new()

Create the object.

my $test = Data::Validate::ChineseID->new;

is_chinese()

Validate the given identity card number is a Chinese or not, return 1 for true, undef for false. Since 15 bits id card is do out of date, we accept only 18 bits card number.

my $re = $test->is_chinese('510522198702097567');

AUTHOR

Peng Yong Hua <pyh@mail.nsbeta.info>

BUGS/LIMITATIONS

If you have found bugs, please send email to <pyh@mail.nsbeta.info>

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Data::Validate::ChineseID

COPYRIGHT & LICENSE

Copyright 2011 Peng Yong Hua, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.