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
-
--optincrements the counter,--opt=Nsets it to N,--no-optresets it to 0. - allows_shortval: false
-
The
-oVALform is disabled so that-vvvcan 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
AUTHORS
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.