Getopt::Yath::Option::AutoMap(3)

NAME
Getopt::Yath::Option::AutoMap - Options that accept multiple values, but also provide a default if no values are provided.

DESCRIPTION
This is a combination of 'Auto' and 'Map' types. The no-arg form "--opt" will add the default key+value pairs to the hash. The "--opt=KEY=VAL" form will add additional values.

SYNOPSIS
    option env_var => (
        field          => 'env_vars',
        short          => 'E',
        type           => 'Map',
        long_examples  => [' VAR=VAL'],
        short_examples => ['VAR=VAL', ' VAR=VAL'],
        description    => 'Set environment variables',
        autofill       => sub { +{ HOME => $ENV{HOME}, USER => $ENV{USER} } },
    );

METHODS
All methods from Getopt::Yath::Option::Map are inherited. The following are overridden or noteworthy:

requires_arg: false
allows_autofill: true
requires_autofill: true
    "--opt" adds the autofill key/value pairs. "--opt=KEY=VAL" adds a specific pair.

SOURCE
The source code repository for Getopt-Yath can be found at <http://github.com/Test-More/Getopt-Yath/>.

MAINTAINERS

Chad Granum <exodist@cpan.org>

AUTHORS

Chad Granum <exodist@cpan.org>

COPYRIGHT
Copyright Chad Granum <exodist7@gmail.com>.

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

See <http://dev.perl.org/licenses/>