Getopt::Yath::Option::Count(3)

NAME
Getopt::Yath::Option::Count - Option that can be incremented as a counter.

DESCRIPTION
Is an integer value, default is to start at 0. "--opt" increments the counter. "--no-opt" resets the counter. "--opt=VAL" can be used to specify a desired count.

SYNOPSIS
    option verbose => (
        type => 'Count',
        short => 'v',
        description => "Increase the verbosity level",
        initialize => 0,
    );

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

requires_arg: false
allows_arg: true
    "--opt" increments the counter, "--opt=N" sets it to N, "--no-opt" resets it to 0.

allows_shortval: false
    The "-oVAL" form is disabled so that "-vvv" can increment the counter multiple times.

is_populated: always true
    Counters are always considered populated since they default to 0.

can_set_env: true
    Count options can set environment variables.

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