|
Convert::Number::Greek - Convert between Arabic and Greek numerals |
Convert::Number::Greek - Convert between Arabic and Greek numerals
This document describes version .01 of this module, hastily released on 16 August, 2006.
use Convert::Number::Greek 'num2greek';
$greek_number = num2greek 1996; # $greek_number now contains a Unicode string.
# OR
use Convert::Number::Greek;
$greek_number = Convert::Number::Greek::num2greek 1996;
=head1 DESCRIPTION
This module provides one exportable subroutine, num2greek, which
converts an Arabic numeral to a Greek numeral in the
form of a Unicode string. The syntax is as follows:
Option Name Default Value Description
upper 0 Use uppercase Greek letters
uc 0 " " " "
stigma 1 Use the stigma for 6 as opposed to
sigma followed by tau
arch_koppa 0 Use the archaic koppa instead of
the modern one
numbersign 1 Append a Greek number sign (U+0374)
to the resulting string
When you specify options, C<undef> is treated as false, so
num2greek $some_number, { uc => 1, stigma }
actually means
num2greek $some_number, { uc => 1, stigma => 0 }
The greek2num function for parsing Greek numbers has yet to be
written....
An object-oriented interface similar to that of
Convert::Number::Roman will be implemented some day.
This module has only been tested in perl 5.8.6 on Darwin. It definitely will not work with perl versions earlier than 5.8.0.
The num2greek function does not yet have any error-checking
mechanism in place. The input should be a string of Arabic digits, or
at least a value that stringifies to such. Using an argument that does
not fit this description may produce nonsensical results.
Father Chrysostomos <sprout @cpan.org>
|
Convert::Number::Greek - Convert between Arabic and Greek numerals |