https://github.com/cerallin/opencc-perl
A perl wrapper for OpenCC.
https://github.com/cerallin/opencc-perl
opencc perl5
Last synced: 5 months ago
JSON representation
A perl wrapper for OpenCC.
- Host: GitHub
- URL: https://github.com/cerallin/opencc-perl
- Owner: Cerallin
- License: gpl-3.0
- Created: 2024-08-09T12:09:36.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-08-09T14:56:13.000Z (almost 2 years ago)
- Last Synced: 2025-01-19T17:11:22.402Z (over 1 year ago)
- Topics: opencc, perl5
- Language: Perl
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OpenCC-perl
A perl wrapper for OpenCC.
## 用法
```perl
use OpenCC;
my $cc = OpenCC->new("s2tw.json");
$converted = $cc->convert("汉字");
print "$converted\n";
```
详情请参考 [OpenCC.pm](OpenCC.pm) 和 [the original repository](https://github.com/BYVoid/OpenCC).
## 编译 & 安装
### 编译安装OpenCC
[详情请参考官方文档。](https://github.com/BYVoid/OpenCC)
### 编译安装OpenCC-perl
```shell
perl Makefile.PL $PATH_TO_OPENCC # for example /usr/local/opencc
make & make install
```
### 运行测试
```shell
perl ./test.pl
```
## TODOs
- [ ] Handle errors on creation.
- [ ] Add method to handle errors.
- [ ] 添加测试