NAME

Getopt::HashDefaults - Allow hash default settings

VERSION

version 0.01

SYNOPSIS

use Getopt::HashDefaults;
my $config = {debug => 1};
my $options = {
  'length=i' => 123.45,
  'help|?' => 0,
};
my $o = Getopt::HashDefaults->new($config);
$options = $o->getoptions($options);
print "Length: $options->{length}\n";

DESCRIPTION

Getopt::HashDefaults uses Getopt::Long to allow default settings without scalar references.

Use this module instead of Getopt::Long and call "getoptions()" with a reference to your default settings hash.

NAME

Getopt::HashDefaults - Allow hash default settings

METHODS

new()

$o = Getopt::HashDefaults->new;

Create a new Getopt::Long::HashDefaults instance.

getoptions()

Accept a hashref of Getopt::Long arguments, extract the argument specs and call the object oriented version of "getoptions" in Getopt::Long.

SEE ALSO

Getopt::Long

AUTHOR

Gene Boggs <gene@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Gene Boggs.

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