NAME

Number::Convert::Roman - Roman-Arabic numeral converter

SYNOPSIS

use Number::Convert::Roman;

$c = Number::Convert::Roman->new;

print $c->arabic('IV'); # prints 4
print $c->roman(4);     # prints IV

DESCRIPTION

Roman converts natural numbers between Roman and Arabic numeral systems.

An extended notation consisting in surrounding powers of thousand by parenthesis is applied to Roman numerals equal or greater than 4000:

  • (IV) corresponds to 4000

  • ((IV)) corresponds to 4000000

  • ((IV)IV)IV corresponds to 4004004

METHODS

$object = Number::Convert::Roman->new

Create a Roman object.

$object->arabic($roman_numeral)

Convert a Roman numeral into its corresponding Arabic one.

Return value: Arabic numeral corresponding to given Roman one.

Example:

# convert IV to Arabic
$object->arabic('IV');	# returns 4
$object->roman($arabic_numeral)

Convert an Arabic numeral into its corresponding Roman one.

Return value: Roman numeral corresponding to given Arabic one.

Example:

# convert 4 to Roman
$converter->roman(4);	# returns IV

EXAMPLES

A sample script using Number::Convert::Roman can be found under the examples directory included with this module.

VERSION

Number::Conver::Roman version 0.01.

AUTHOR

Santos, José.

BUGS

Please report any bugs or feature requests to bug-number-convert-roman at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Number-Convert-Roman. The author will be notified and there will be automatic notification about progress on bugs as changes are made.

SUPPORT

Documentation for this module can be found with the following perldoc command:

perldoc Number::Convert::Roman

Additional information at:

COPYRIGHT AND LICENSE

Copyright (c) 2015 José Santos. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.

DEDICATION

I dedicate Number::Convert::Roman to Prof. Nené.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 181:

Non-ASCII character seen before =encoding in 'José.'. Assuming CP1252