Koichi Taniguchi > Number-Phone-JP-0.03 > Number::Phone::JP

Download:
Number-Phone-JP-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 0.03   Source   Latest Release: Number-Phone-JP-0.12

NAME ^

Number::Phone::JP - Validate Japanese phone numbers

SYNOPSIS ^

 use Number::Phone::JP;
 
 my $tel = Number::Phone::JP->new('012', '34567890');
 print "This is valid!!\n" if $tel->is_valid_number;
 
 $tel->set_number('098 7654 3210');
 print "This is valid!!\n" if $tel->is_valid_number;
 
 $tel->import(qw(mobile PHS));
 $tel->set_number('090-0123-4567');
 print "This is valid!!\n" if $tel->is_valid_number;

DESCRIPTION ^

Number::Phone::JP is a simple module to validate Japanese phone number formats. The Japanese phone numbers are regulated by Ministry of Public Management, Home Affairs, Posts and Telecommunications of Japan. You can validate what a target number is valid from this regulation point of view.

There are many categories for type of telephones in Japan. This module is able to be used narrowed down to the type of phones.

This module only validates what a phone number agrees on the regulation. Therefore, it does NOT validate what a phone number actually exists.

This validation needs only an area (or category) prefix and behind it. The separator of number behind the prefix is ignored.

METHODS ^

EXAMPLE ^

 use Number::Phone::JP qw(mobile phs);
 
 my $tel = Number::Phone::JP->new;
 open FH, 'customer.list' or die "$!";
 while (<FH>) {
     chomp;
     unless ($tel->set_number($_)->is_valid_number) {
         print "$_ is not valid number\n"
     }
 }
 close FH;

QUESTIONS ^

Q: I can't read and understand what is written on this POD. Because I'm Japanese.

A: Do not be afraid. There is "Japanized Perl Resources Project" in Japan. See http://perldocjp.sourceforge.jp/, and find Japanized POD at there.

SEE ALSO ^

Number::Phone::JP::Table

AUTHOR ^

Koichi Taniguchi <taniguchi@users.sourceforge.jp>

COPYRIGHT ^

Copyright (c) 2003 Koichi Taniguchi. Japan. All rights reserved.

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