Data::Validate::Japanese - Validate Japanese Input
use Data::Validate::Japanese; my $dvj = Data::Validate::Japanese->new; $ok = $dvj->is_hiragana($data); $ok = $dvj->is_katakana($data); $ok = $dvj->is_kanji($data); $ok = $dvj->is_h_katakana($data); $dvj->contains_only($value, { hiragana => 1, katakana => 1, kanji => 1, h_katakana => 1, ascii => 1 });
Data::Validate::Japanese aims to be the base (or at least, the common link between) the myriad different data validator infrastructures, and their Japanese-specific extensions. There are just too many validators with too many different interfaces, but it's not like the core handling of Japanese characters change.
All methods return true or false unless otherwise stated. All methods also expect Japanese characters that have successfully been decoded to Perl's internal unicode format.
Creates a new instance of Data::Validate::Japanese
Checks if a value contains half-width katakana only. Returns true or false
Checks if a value contains only ascii
Checks if a value contains characters within the range from the list of candidates
Copyright (c) 2007 Daisuke Maki <daisuke@endeworks.jp>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Data::Validate::Japanese, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Validate::Japanese
CPAN shell
perl -MCPAN -e shell install Data::Validate::Japanese
For more information on module installation, please visit the detailed CPAN module installation guide.