Bryan Smith > In-Korean-Numbers-SinoKorean-0.04 > In::Korean::Numbers::SinoKorean

Download:
In-Korean-Numbers-SinoKorean-0.04.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View/Report Bugs
Module Version: 0.04   Source  

NAME ^

In::Korean::Numbers::SinoKorean - Convert integers to Sino-Korean text (in Hangul) and vice versa.

VERSION ^

Version 0.04

SYNOPSIS ^

    use In::Korean::Numbers;

    # Object-oriented API
    my $sk     = In::Korean::Numbers::SinoKorean->new();
    my $hangul = $sk->getHangul( 42 ); # 사십이
    my $int    = $sk->getInt( '백이십삼' ); # 123
    
    # Procedural API
    $hangul = In::Korean::Numbers::SinoKorean::getHangul( 42 ); # 사십이
    $int = In::Korean::Numbers::SinoKorean::getInt( '백이십삼' ); # 123

SUBROUTINES/METHODS ^

new

Constructor that takes no arguments returns a new In::Korean::Numbers::SinoKorean object.

getHangul

Given a positive integer, returns string for Sino-Korean (as Hangul).

    my $hangul = $sk->getHangul( 42 ); # 사십이
    $hangul = In::Korean::Numbers::SinoKorean::getHangul( 42 ); # 사십이

getInt

Given a positive integer in Sino-Korean (as Hangul), returns number.

    my $int = $sk->getInt( '백이십삼' ); # 123
    $int = In::Korean::Numbers::SinoKorean::getInt( '백이십삼' ); # 123
syntax highlighting: