From: Fabian Grünbichler Date: Thu, 6 Oct 2016 13:12:11 +0000 (+0200) Subject: correct spelling of synopsis X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=0a5a1eeec20f17d2a7fa3c8b2782df1391ff8555;hp=ec48b70cc9bac42f297370746efa65dc8c6a76dd correct spelling of synopsis --- diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 2a9a6c9..e2a81a0 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -112,7 +112,7 @@ __PACKAGE__->register_method ({ }}); -sub print_simple_asciidoc_synopsys { +sub print_simple_asciidoc_synopsis { my ($class, $name, $arg_param, $uri_param) = @_; die "not initialized" if !$cli_handler_class; @@ -128,7 +128,7 @@ sub print_simple_asciidoc_synopsys { return $synopsis; } -sub print_asciidoc_synopsys { +sub print_asciidoc_synopsis { die "not initialized" if !($cmddef && $exename && $cli_handler_class); @@ -363,6 +363,11 @@ sub find_cli_class_source { sub generate_asciidoc_synopsys { my ($class) = @_; + $class->generate_asciidoc_synopsis(); +}; + +sub generate_asciidoc_synopsis { + my ($class) = @_; $cli_handler_class = $class; @@ -372,13 +377,13 @@ sub generate_asciidoc_synopsys { my $def = ${"${class}::cmddef"}; if (ref($def) eq 'ARRAY') { - print_simple_asciidoc_synopsys(@$def); + print_simple_asciidoc_synopsis(@$def); } else { $cmddef = $def; $cmddef->{help} = [ __PACKAGE__, 'help', ['cmd'] ]; - print_asciidoc_synopsys(); + print_asciidoc_synopsis(); } }