Reproducible randomness 

sub next_random_val {
    my $self = shift;
    my $data = $self->random_data || [];
    if(!@$data) {
        my $hash = md5_hex( $self->last_hash || $self->input_hash);
        $self->last_hash($hash);
        $data = [
            map { hex($_) } $hash =~ m{(..)}g
        ];
        $self->random_data($data);
    }
    return shift(@$data);
}