MooseX::Getopt::Basic - MooseX::Getopt::Basic - role to implement the Getopt::Long functionality


MooseX-Getopt documentation  | view source Contained in the MooseX-Getopt distribution.

Index


NAME

Top

MooseX::Getopt::Basic - MooseX::Getopt::Basic - role to implement the Getopt::Long functionality

SYNOPSIS

Top

  ## In your class
  package My::App;
  use Moose;

  with 'MooseX::Getopt::Basic';

  has 'out' => (is => 'rw', isa => 'Str', required => 1);
  has 'in'  => (is => 'rw', isa => 'Str', required => 1);

  # ... rest of the class here

  ## in your script
  #!/usr/bin/perl

  use My::App;

  my $app = My::App->new_with_options();
  # ... rest of the script here

  ## on the command line
  % perl my_app_script.pl --in file.input --out file.dump

DESCRIPTION

Top

This is like MooseX::Getopt and can be used instead except that it doesn't make use of Getopt::Long::Descriptive (or "GLD" for short).

METHODS

Top

new_with_options

See new_with_options in MooseX::Getopt.

process_argv

See process_agv in MooseX::Getopt.

AUTHORS

Top

COPYRIGHT AND LICENSE

Top


MooseX-Getopt documentation  | view source Contained in the MooseX-Getopt distribution.