1Test::Smoke::App::AppOpUtsieorn(C3o)ntributed Perl DocumTeenstta:t:iSomnoke::App::AppOption(3)
2
3
4

NAME

6       Test::Smoke::App::AppOption - Object that represents an Application
7       Option.
8

SYNOPSIS

10           use Test::Smoke::App::AppOption;
11           my $o = Test::Smoke::App::AppOption->new(
12           );
13           printf "%s\n", $o->gol_option;
14           print $o->show_helptext;
15

DESCRIPTION

17   Test::Smoke::App::AppOption->new(%arguments)
18       Arguments
19
20       Named:
21
22       name => $basic_option_name [required]
23       option => $option_extention (see Getopt::Long)
24       allow => $arrary_ref_with alternatives
25       default => $default_value
26       helptext => $text_to_show_with help
27
28       Returns
29
30       An instance.
31
32       Exceptions
33
34       croak()s when:
35
36       name not set
37       allow is not undef or an ArrayRef
38
39   $option->allowed($value[, $allow])
40       Checks if a value is in a set of allowed values.
41
42       Arguments
43
44       Positional.
45
46       $value (the value to check)
47       $allow [optional]
48           $allow can be:
49
50           ·       ArrayRef => a list of allowed() items
51
52           ·       Regex => a regex to test $value against.
53
54           ·       CodeRef => a coderef that is executed with $value
55
56           ·       other_value => $value eq $other_value (checks for
57                   definedness)
58
59       Returns
60
61       (perl) True of False.
62
63   $opt->gol_option
64       Getopt::Long compatible option string.
65
66   $opt->show_helptext()
67           sprintf "%-30s - %s", $option_with_allowd, $self->helptext
68
70       (c) 2002-2013, Abe Timmerman <abeltje@cpan.org> All rights reserved.
71
72       With contributions from Jarkko Hietaniemi, Merijn Brand, Campo
73       Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop,
74       Rich Rauenzahn, David Cantrell.
75
76       This library is free software; you can redistribute it and/or modify it
77       under the same terms as Perl itself.
78
79       See:
80
81       ·   <http://www.perl.com/perl/misc/Artistic.html>
82
83       ·   <http://www.gnu.org/copyleft/gpl.html>
84
85       This program is distributed in the hope that it will be useful, but
86       WITHOUT ANY WARRANTY; without even the implied warranty of
87       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
88
89
90
91perl v5.30.1                      2020-02-10    Test::Smoke::App::AppOption(3)
Impressum