Getopt::Yath::Option::Auto(3pm)

NAME
Getopt::Yath::Option::Auto - Options with default values that also accept arguments.

DESCRIPTION
This type has an 'autofill' value that is used if no argument is provided to the parameter, IE "--opt". But can also be given a specific value using "--opt=val". It DOES NOT support "--opt VAL" which will most likely result in an exception.

SYNOPSIS
    option help => (
        type     => 'Auto',
        autofill => 'ALL',    # Default to all if no subtitle
        short    => 'h',

        description    => "Show help, optionally just show a specific subtitle from help output",
        short_examples => ['', '=Subtitle'],
        long_examples  => ['', '=Subtitle'],
    );

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

requires_arg: false
allows_autofill: true
requires_autofill: true
    "--opt" uses the autofill value. "--opt=val" uses the provided value. "--opt VAL" is not supported (the next argument is not consumed).

can_set_env: true

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/>