NAME

Getopt::Abridged - quick and simple full-featured option handling

SYNOPSIS

sub main {
  my @args = @_;

  my $opt = Getopt::Abridged->new(
    'w|world=s=world',
    'g|greeting=s=hello',
    'v|verbose=1',
    'q|quiet=!verbose',
    -positional => ['world'],
  )->process(\@args) or return;

  print $opt->greeting, ' ', $opt->world, "\n" if($opt->verbose);
}

main(@ARGV) if($0 eq __FILE__);

About

This module is provided as a shortcut for using Getopt::Base and to support easily transitioning into Getopt::AsDocumented.

new

my $opt = Getopt::Abridged->new(@opts, @args);

import

This translates your options into pod for use with Getopt::AsDocumented.

Getopt::Abridged->import('pod');

unimport

Getopt::Abridged->unimport;

This is activated via import and the call to process(). If your application is written to return/exit when process() returns false, you may simply do:

perl -MGetopt::Abridged=pod -S your_program

You will then want to see Getopt::AsDocumented and change your process() call to:

Getopt::AsDocumented->process(\@args) or return;

The builtin --version and --help options will be automatically included in the pod output.

TODO =for positional directives need to be printed from here.

AUTHOR

Eric Wilhelm @ <ewilhelm at cpan dot org>

http://scratchcomputing.com/

BUGS

If you found this module on CPAN, please report any bugs or feature requests through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

If you pulled this development version from my /svn/, please contact me directly.

COPYRIGHT

Copyright (C) 2009 Eric L. Wilhelm, All Rights Reserved.

NO WARRANTY

Absolutely, positively NO WARRANTY, neither express or implied, is offered with this software. You use this software at your own risk. In case of loss, no person or entity owes you anything whatsoever. You have been warned.

LICENSE

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.