+ fix custom mode choose (simple)

This commit is contained in:
garnier-quentin 2015-09-18 15:49:07 +02:00
parent 8da8362e1a
commit 82f3a65a7b
1 changed files with 2 additions and 2 deletions

View File

@ -102,8 +102,8 @@ sub init {
if (defined($self->{custommode_name}) && $self->{custommode_name} ne '') {
$self->load_custom_mode();
} elsif (scalar(%{$self->{custom_modes}}) == 1) {
$self->{custommode_name} = keys(%{$self->{custom_modes}})[0];
} elsif (scalar(keys %{$self->{custom_modes}}) == 1) {
$self->{custommode_name} = (keys(%{$self->{custom_modes}}))[0];
$self->load_custom_mode();
} else {
$self->{output}->add_option_msg(short_msg => "Need to specify '--custommode'.");