The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Getopt::Kingpin::Flag - command line option object

SYNOPSIS

    use Getopt::Kingpin;
    my $kingpin = Getopt::Kingpin->new;
    my $name = $kingpin->flag('name', 'set name')->string();
    $kingpin->parse;

    printf "name : %s\n", $name;

DESCRIPTION

Getopt::Kingpin::Flag は、Getopt::Kingpinから使用するモジュールです。

METHOD

new()

Create Getopt::Kingpin::Flag object.

short($short_name)

short optionを作成します。

default($default_value)

デフォルト値を設定します。

override_default_from_envar($env_var_name)

デフォルト値を環境変数で上書きします。

required()

そのオプションを必須とする。

set_value($value)

$self->valueに値を設定します。 実際の処理ではGetopt::Kingpin::Type::以下のモジュールが使われます。

LICENSE

Copyright (C) sago35.

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

AUTHOR

sago35 <sago35@gmail.com>