This commit is contained in:
Quentin Garnier 2014-11-18 15:49:02 +01:00
parent 76835582b6
commit acaa8348bf
4 changed files with 20 additions and 4 deletions

View File

@ -128,7 +128,11 @@ sub init {
}
if (defined($options{help})) {
$self->{options}->add_help(package => $self->{modes}{$self->{mode_name}}, sections => 'MODE');
if (defined($self->{mode_name}) && $self->{mode_name} ne '') {
$self->{options}->add_help(package => $self->{modes}{$self->{mode_name}}, sections => 'MODE');
} else {
$self->{options}->add_help(package => $self->{dynmode_name}, sections => 'MODE');
}
$self->{options}->display_help();
$self->{output}->option_exit();
}

View File

@ -107,7 +107,11 @@ sub init {
}
if (defined($options{help})) {
$self->{options}->add_help(package => $self->{modes}{$self->{mode_name}}, sections => 'MODE');
if (defined($self->{mode_name}) && $self->{mode_name} ne '') {
$self->{options}->add_help(package => $self->{modes}{$self->{mode_name}}, sections => 'MODE');
} else {
$self->{options}->add_help(package => $self->{dynmode_name}, sections => 'MODE');
}
$self->{options}->display_help();
$self->{output}->option_exit();
}

View File

@ -112,7 +112,11 @@ sub init {
}
if (defined($options{help})) {
$self->{options}->add_help(package => $self->{modes}{$self->{mode_name}}, sections => 'MODE');
if (defined($self->{mode_name}) && $self->{mode_name} ne '') {
$self->{options}->add_help(package => $self->{modes}{$self->{mode_name}}, sections => 'MODE');
} else {
$self->{options}->add_help(package => $self->{dynmode_name}, sections => 'MODE');
}
$self->{options}->display_help();
$self->{output}->option_exit();
}

View File

@ -129,7 +129,11 @@ sub init {
}
if (defined($options{help})) {
$self->{options}->add_help(package => $self->{modes}{$self->{mode_name}}, sections => 'MODE');
if (defined($self->{mode_name}) && $self->{mode_name} ne '') {
$self->{options}->add_help(package => $self->{modes}{$self->{mode_name}}, sections => 'MODE');
} else {
$self->{options}->add_help(package => $self->{dynmode_name}, sections => 'MODE');
}
$self->{options}->display_help();
$self->{output}->option_exit();
}