ORDB::Unihan - An ORM for the published Unihan database
version 0.03
use ORDB::Unihan; # dbh way my $dbh = ORDB::Unihan->dbh; my $sql = 'SELECT val FROM unihan WHERE hex = 3402 AND type="RSUnicode"'; my $sth = $dbh->prepare($sql); # simple way ORDB::Unihan->selectrow_array($statement); # or ORLite way my $vals = ORDB::Unihan::Unihan->select( 'where hex = ?', '3402' );
TO BE COMPLETED
perldoc ORLite, plus
sqlite_path
my $sqlite_path = ORDB::Unihan->sqlite_path();
where the Unihan.sqlite is
CREATE TABLE unihan ( "hex" CHAR(5) NOT NULL, "type" VARCHAR(18) NOT NULL, "val" VARCHAR(255), PRIMARY KEY ("hex", "type") )
the Unicode scalar value as U+[x]xxxx. 'hex' is [x]xxxx without U+
one of Cangjie, Cantonese, CihaiT, Cowles, Definition, HanYu, IRGHanyuDaZidian, IRGKangXi, IRG_GSource, IRG_JSource, IRG_TSource, Mandarin, Matthews, OtherNumeric, Phonetic, RSAdobe_Japan1_6, RSUnicode, SemanticVariant, Matthews, TotalStrokes
the value for hex and type
hex
type
Fayland Lam <fayland@gmail.com>
This software is copyright (c) 2013 by Fayland Lam.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install ORDB::Unihan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ORDB::Unihan
CPAN shell
perl -MCPAN -e shell install ORDB::Unihan
For more information on module installation, please visit the detailed CPAN module installation guide.