Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (13 sloc) 0.421 kB
package DDG::Goodie::Roman;
use DDG::Goodie;
use Roman;
triggers any => "roman", "arabic";
zci is_cached => 1;
zci answer_type => "roman_numeral_conversion";
handle remainder => sub {
s/\s*(?:numeral|number)\s*//i;
return uc(roman($_)) . ' (roman numeral conversion)' if /^\d+$/ && roman($_);
return arabic($_) . ' (roman numeral conversion)' if lc($_) =~ /^[mdclxvi]+$/ && arabic($_);
return;
};
1;
Jump to Line
Something went wrong with that request. Please try again.