NAME
Getopt::Hash - Process command line options based upon convention rather than configuration.
VERSION
Version 0.01
SYNOPSIS
I have simple command line option processing needs. I don't want to configure a list of allowed options and I want to be able to mix-and-match single-character ("-h") with long ("--version") options. This module is intended to fill that role. It processes @ARGV, returns a hash of command line options and then gets out of your way.
Basic usage:
use Getopt::Hash;
# Processes @ARGV and returns hash of identified options.
my $opts = Getopt::Hash::getopts();
But examples are always more illustrative:
When @ARGV = ()
Returns
{}
When @ARGV = ( '-a' )
Returns
{ 'a' => '' }
When @ARGV = ( '-a', '-b=bravo', '-c:charlie', '-verbose' )
Returns
{ 'a' => '', 'b' => 'bravo', 'c' => 'charlie', 'verbose' => '' }
When @ARGV = ( '-a', '--', '-b', 'foo', 'bar', 'baz' )
Returns
{ 'a' => '' }
EXPORT
No functions are currently exported.
FUNCTIONS
getopts
Returns hash reference of command line options found in @ARGV.
AUTHOR
Blair Christensen, <blair at devclue.com>
BUGS
Please report any bugs or feature requests to bug-getopt-hash at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Getopt-Hash. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Getopt::Hash
You can also look for information at:
RT: CPAN's request tracker
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2008 Blair Christensen, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.