Description

Roman is a module for conversion between Roman and Arabic numerals.

use Roman; $arabic = arabic($roman) if isroman($roman); $roman = Roman($arabic); $roman = roman($arabic);

Why use Roman?

Why NOT use Roman?

Note: the module does not have a Makefile.PL, so you will have to copy it in your perl module path yourself that should be something like /usr/lib/perl5/site_perl/5.6.0/. Alternatively you can use ExtUtils::MakeMaker to generate a Makefile.PL:

perl -e 'use ExtUtils::MakeMaker; WriteMakefile(NAME => "Roman");'

Personal comments

Roman is a little module that I found when I had to convert Roman numbered lists from XML to HTML. Instead of spending half an hour remembering how those guys counted then writing it myself it took me 5 minutes to install a generic solution. Cool!

I guess now with Unicode being available the module could be upgraded to handle more numbers.

Update: it might look like Dominus does not quite like Roman: Roman.pm is a new contender for stupidest Perl module ever written. but he is actually talking about a different module, one he wrote himself and apparently never submitted to CPAN, which allows you to write things like $IV+$IV and get VIII as a result.


In reply to Roman by mirod

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.