1Test::Smoke::App::Base(U3s)er Contributed Perl DocumentatTieosnt::Smoke::App::Base(3)
2
3
4

NAME

6       Test::Smoke::App::Base - Baseclass for Test::Smoke::App::*
7       applications.
8

SYNOPSIS

10           package Test::Smoke::App::Mailer;
11           use base 'Test::Smoke::App::Base';
12           sub run {...}
13

DESCRIPTION

15           use Test::Smoke::App::Mailer;
16           my $mailer = Test::Smoke::App::Mailer->new(
17               main_options => [
18                   Test::Smoke::App::AppOption->new(
19                       name     => 'mailer',
20                       option   => '=s',
21                       allow    => [qw/MIME::lite sendmail/],
22                       helptext => "Mailsystem to use for sendig reports.",
23                   ),
24               ],
25               genral_options => [
26                   Test::Smoke::AppOption->new(
27                       name    => 'ddir',
28                       option  => '=s',
29                       helptxt => "Smoke Destination Directory.",
30                   ),
31
32               ],
33               special_options => {
34                   'MIME::Lite' => [
35                       mserver(),
36                       msport(),
37                       msuser(),
38                       mspass(),
39                   ],
40                   'sendmail' => [],
41               },
42           );
43
44         $mailer->run();
45
46   Test::Smoke::App->new(%arguments)
47       Arguments
48
49       Named:
50
51       main_options => $list_of_test_smoke_appoptions
52       general_options => $list_of_test_smoke_appoptions
53           These options are always valid.
54
55       special_options => $hashref
56           This is a hashref with the values of the "allow"-array, that hold a
57           list of Test::Smoke::AppOptions.
58
59       Exceptions
60
61       None.
62
63   Test::Smoke::App::Base->configfile_option()
64       Returns a Test::Smoke::App::AppOption for 'configfile'.
65
66   Test::Smoke::App::Base->verbose_option()
67       Returns a Test::Smoke::App::AppOption for 'verbose'.
68
69   $app->show_config_option
70   $app->process_options()
71       This process constists of three (3) steps:
72
73       1. pre_process_options
74           This step organizes the options in a AppOptionCollection.
75
76       2. get_options
77           This step processes the arguments passed on the command line.
78
79       3. post_process_options
80           This step integrates the arguments, their coded-defaults, config-
81           file values and command-line overrides.
82
83       Arguments
84
85       None.
86
87       Returns
88
89       The object-instance.
90
91       Exceptions
92
93       None.
94
95   $app->option($option)
96       Return the value of an option.
97
98       Arguments
99
100       Positional.
101
102       $option_name
103
104       Returns
105
106       The value of that option if applicable.
107
108       Exceptions
109
110       Invalid option 'blah' ($name = $type)>
111       Option 'blah' is invalid for $name = $type>
112
113   $app->options()
114       Arguments
115
116       None.
117
118       Returns
119
120       A hash (list) of all options that apply to this instance of the app.
121
122       Exceptions
123
124       None.
125
127       (c) 2002-2013, Abe Timmerman <abeltje@cpan.org> All rights reserved.
128
129       With contributions from Jarkko Hietaniemi, Merijn Brand, Campo
130       Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop,
131       Rich Rauenzahn, David Cantrell.
132
133       This library is free software; you can redistribute it and/or modify it
134       under the same terms as Perl itself.
135
136       See:
137
138       •   <http://www.perl.com/perl/misc/Artistic.html>
139
140       •   <http://www.gnu.org/copyleft/gpl.html>
141
142       This program is distributed in the hope that it will be useful, but
143       WITHOUT ANY WARRANTY; without even the implied warranty of
144       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
145
146
147
148perl v5.38.0                      2023-07-21         Test::Smoke::App::Base(3)
Impressum