NAME

Getopt::Yath::Option::Bool - Option type for boolean values (no arguments)

DESCRIPTION

Is either on or off. --opt will turn it on. --no-opt will turn it off. Default is off unless the default is parameter is provided.

SYNOPSIS

option dry_run => (
    type => 'Bool',
    description => "Only pretend to do stuff",
    default => 0,
);

METHODS

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

requires_arg: false
allows_arg: false

Bool options take no argument. --opt turns it on, --no-opt turns it off.

can_set_env: true

Bool options can set environment variables. Negated env vars (!VAR) are supported and will invert the boolean value.

get_default_value

Returns 0 by default unless a custom default is provided.

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/