Alastair McGowan-Douglas
and 1 contributors

NAME

List::Analyse::Sequence::Analyser::OL::RomanNumerals - Find Roman numeral sequences.

DESCRIPTION

Used as a plugin to List::Analyse::Sequence, this will determine whether your sequence contains any Roman numerals.

SYNOPSIS

    use List::Analyse::Sequence;

    ...

    my $seq = List::Analyse::Sequence->new;
    $seq->use_these_analysers( 'List::Analyse::Sequence::Analyser::OL::RomanNumerals' );

    $seq->analyse( @stuff );
    my ($result) = $seq->result;

    # Returns undef if no sequences matched.
    if( defined $result ) {
        my $roman_analyser  = $result->[0];

        ...
    }

    ...

List::Analyse::Sequence will return an object of this type when it is finished analysing if your list had a Roman numeral sequence in it.

If a consistent prefix was found, this will be stored and you can get at it with the prefix method on that object.

METHODS

new

Creates a new one. This is called by List::Analyse::Sequence and so you probably don't need to use it directly.

analyse

Analyses a string for sequentialism with the previous.

done

When finished, the shortest prefix found was taken to be the prefix. In the case where multiple prefixes were found (i.e. multiple sequences) you will therefore only be told of the first.

prefix

The consistent prefix that was found in front of your numeral sequence.

TODO

Find some way of pattern-matching the prefix to see if there is a pattern there.
Find and report on multiple sequences at once.
Allow the use of parentheses, which wikipedia says you can use, so you can.