DynGig::Util::CLI - An easy-to-print CLI menu for Getopt
use DynGig::Util::CLI; use Getopt::Long; 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};
Returns menu options as a list. Returns ARRAY reference in scalar context.
Serializes menu.
See DynGig::Util
To install DynGig::Util, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DynGig::Util
CPAN shell
perl -MCPAN -e shell install DynGig::Util
For more information on module installation, please visit the detailed CPAN module installation guide.