The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

NAME

DynGig::Util::CLI - An easy-to-print CLI menu for Getopt

SYNOPSIS

my %o = ( s => 30, link => 'current' );
my $menu = DynGig::Util::CLI->new
(
'h|help',"print help menu",
's|sleep=i',"[ $o{s} ] seconds between iterations",
'link=s',"[ $o{link} ] symlink to current config",
'server=s','server host:port',
);
my @option = $menu->option();
my $string = $menu->string();
die join "\n", "Usage:\tdefault value in [ ]", $string, "\n"
unless Getopt::Long::GetOptions( \%o, @option ) && ! $o{h};

option()

Returns menu options as a list. Returns ARRAY reference in scalar context.

string()

Serializes menu.

NOTE

See DynGig::Util