App-Cmd

 view release on metacpan or  search on metacpan

lib/App/Cmd/Tutorial.pod  view on Meta::CPAN

#pod   $ yourcmd reset -zB --new-seed xyzzy foo.db bar.db
#pod
#pod C<-zB> and C<--new-seed xyzzy> are "options" and C<foo.db> and C<bar.db>
#pod are "arguments."
#pod
#pod With a properly configured command class, the above invocation results in
#pod nicely formatted data:
#pod
#pod   $opt = {
#pod     zero      => 1,
#pod     no_backup => 1, #default value
#pod     new_seed  => 'xyzzy',
#pod   };
#pod
#pod   $args = [ qw(foo.db bar.db) ];
#pod
#pod Arguments are processed by L<Getopt::Long::Descriptive> (GLD).  To customize
#pod its argument processing, a command class can implement a few methods:
#pod C<usage_desc> provides the usage format string; C<opt_spec> provides the option
#pod specification list; C<validate_args> is run after Getopt::Long::Descriptive,
#pod and is meant to validate the C<$args>, which GLD ignores. See L<Getopt::Long>

lib/App/Cmd/Tutorial.pod  view on Meta::CPAN

  $ yourcmd reset -zB --new-seed xyzzy foo.db bar.db

C<-zB> and C<--new-seed xyzzy> are "options" and C<foo.db> and C<bar.db>
are "arguments."

With a properly configured command class, the above invocation results in
nicely formatted data:

  $opt = {
    zero      => 1,
    no_backup => 1, #default value
    new_seed  => 'xyzzy',
  };

  $args = [ qw(foo.db bar.db) ];

Arguments are processed by L<Getopt::Long::Descriptive> (GLD).  To customize
its argument processing, a command class can implement a few methods:
C<usage_desc> provides the usage format string; C<opt_spec> provides the option
specification list; C<validate_args> is run after Getopt::Long::Descriptive,
and is meant to validate the C<$args>, which GLD ignores. See L<Getopt::Long>



( run in 1.708 second using v1.01-cache-2.11-cpan-49f99fa48dc )