From 0a5a1eeec20f17d2a7fa3c8b2782df1391ff8555 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Thu, 6 Oct 2016 15:12:11 +0200 Subject: [PATCH] correct spelling of synopsis --- src/PVE/CLIHandler.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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(); } } -- 2.39.2