Convert::Number::Roman - Convert Between Western and Roman Numeral Systems
# # instantiate with a Western or Roman number (in UTF-8) # my $n = new Convert::Number::Roman( 4294967296 ); my $romanNumber = $n->convert; $n->number ( 54321 ); # reset number handle print $n->convert, "\n"; print $n->convert ( "lower" ), "\n"; # convert in lowercase numerals print "2003 => ", $n->convert ( 2003 ), "\n"; # convert new number
Implementation of the Roman numeral conversion algorithm proposed for the CSS3-List module specification. Use to convert between Western and Roman numeral systems under Unicode.
Roman numerals have both uppercase and lowercase styles. The default style used is the uppercase. The default style can be set at instantiation time as per:
my $n = new Convert::Number::Roman( "lower" );
my $n = new Convert::Number::Roman( 4294967296, "lower" );
The default style may also be set during conversion as per:
$n->convert( "lower" );
$n->convert( 4294967296, "lower" );
style method is also available to set or query the default style:
my $style = $n->style; # query style $n->style( "upper" ); # reset style
The package is known to work on Perl 5.6.1 and 5.8.0 but has not been tested on other versions of Perl by the author.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
None presently known.
Daniel Yacob, firstname.lastname@example.org
Included with this package: