Lingua::Sinica::PerlYuYan - Use Chinese to write Perl
#!/usr/local/bin/perl
# The Sieve of Eratosthenes - 埃拉托斯芬篩法
use Lingua::Sinica::PerlYuYan;
用籌兮用嚴 井涸兮無礙。
印曰最高矣 又道數然哉。
截起吾純風 賦小入大合。
習予吾陣地 並二至純風。
當起段賦取 加陣地合始。
陣地賦篩始 繫繫此雜段。
終陣地兮印 正道次標哉。
輸空接段點 列終註泰來。
The Lingua::Sinica::PerlYuYan makes it makes it possible to write Perl programs in Chinese. (If you have to ask "Why?", please refer to the Lingua::Romana::Perligata manpage for related information.)
This module uses the single-character property of Chinese to disambiguate between keywords, thus whitespaces could be omitted this way, much like in real Chinese writings.
The vocabulary is of the WenYanWen (文言文, literary text) mode, not much used in modern Chinese, which prefers the BaiHuaWen (白話文, spoken text) mode with multiple-syllable words.
You could use Lingua::Sinica::PerlYuYan::translate() (or simply
as 譯()) to translate a string containing English programs into
Chinese.
Currently Big-5 only. UTF-8 and GB2312 support is trivial, and will be available upon request.
the Filter::Simple manpage, the Lingua::Romana::Perligata manpage.
Autrijus Tang <autrijus@autrijus.org>
Copyright 2001, 2002 by Autrijus Tang <autrijus@autrijus.org>.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.