GetOptions(\%options,
'option=s@',
'default_option|default-option!',
+ 'quorum=i',
);
if (not exists $options{option} or not ref($options{option}) or
@{$options{option}} < 2
}
winner(options=>\@options,
default_option => exists $options{default_option} ? $options{default_option} : 1,
+ quorum => exists $options{quorum} ? $options{quorum} : 2,
);
}
}
# The constitution defines the maximum value of K to be 5
- my $K = 2; # Math::BigFloat->new($params{quorum});
+ my $K = $params{quorum};
# 1. Given two options A and B, V(A,B) is the number of voters who
# prefer option A over option B.