Test::S...p::Base(3)
π Test::S...p::Base(3) π
okay bestie, welcome to the User Contributed Perl Documentation corner of the internet, where we're talking about Test::S...p::Base(3). yes the name is literally abbreviated with dots, we don't make the rules π
β¨ NAME β¨
Test::Smoke::App::Base β the Baseclass for all the Test::Smoke::App::* applications. it's giving parent energy, it's giving "everyone inherits from me" π
πΈ SYNOPSIS πΈ
package Test::Smoke::App::Mailer;
use base 'Test::Smoke::App::Base';
sub run {...}
that's it, that's the vibe. you say use base and suddenly you're a whole app π
π¦ DESCRIPTION π¦
so like, here's a real usage moment:
use Test::Smoke::App::Mailer;
my $mailer = Test::Smoke::App::Mailer->new(
main_options => [
Test::Smoke::App::AppOption->new(
name => 'mailer',
option => '=s',
allow => [qw/MIME::lite sendmail/],
helptext => "Mailsystem to use for sendig reports.",
),
],
genral_options => [
Test::Smoke::App::AppOption->new(
name => 'ddir',
option => '=s',
helptxt => "Smoke Destination Directory.",
),
],
special_options => {
'MIME::Lite' => [
mserver(),
msport(),
msuser(),
mspass(),
],
'sendmail' => [],
},
);
$mailer->run();
no bestie I did not typogenral_optionsorhelptxtβ that's literally what's in the source, we copy character for character in this house π
π Test::Smoke::App->new(%arguments) π
Arguments
Named:
main_options=>$list_of_test_smoke_appoptionsgeneral_options=>$list_of_test_smoke_appoptions
these options are always valid. no cap, always.
special_options=>$hashref
this is a hashref where the keys are the values of the "allow"-array, and each one holds a list of Test::Smoke::AppOptions.
Exceptions
None. literally none. nothing to see here π«Ά
π Test::Smoke::App::Base->configfile_option() π
returns a Test::Smoke::App::AppOption for 'configfile'. slay.
β Test::Smoke::App::Base->verbose_option() β
returns a Test::Smoke::App::AppOption for 'verbose'. iconic.
π
$app->show_config_option π
(it's here, it exists, the original says nothing else about it, and honestly? mysterious main character energy π)
π $app->process_options() π
this process constists of three (3) steps β yes, three, we're counting:
pre_process_optionsthis step organizes the options in aAppOptionCollection.get_optionsthis step processes the arguments passed on the command line.post_process_optionsthis step integrates the arguments, their coded-defaults, config-file values and command-line overrides. the full glow-up pipeline β¨
Arguments
None.
Returns
the object-instance.
Exceptions
None.
π§ $app->option($option) π§
return the value of an option.
Arguments
Positional.
$option_name
Returns
the value of that option if applicable.
Exceptions
Invalid option 'blah' ($name = $type)>Option 'blah' is invalid for $name = $type>
both of those trailing > characters are exactly how they appear, bestie, I am not touching them π
π $app->options() π
Arguments
None.
Returns
a hash (list) of all options that apply to this instance of the app.
Exceptions
None.
π COPYRIGHT π
(c) 2002-2013, Abe Timmerman <abeltje@cpan.org> All rights reserved.
with contributions from Jarkko Hietaniemi, Merijn Brand, Campo Weijerman, Alan Burlison, Allen Smith, Alain Barbet, Dominic Dunlop, Rich Rauenzahn, David Cantrell. the whole squad showed up and ate π«Ά
this library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
see:
this program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. read that again if you need to, it's serious π
and that's the whole page, bestie! this was Test::S...p::Base(3) from perl v5.42.0, dated 2025-07-25. go forth and inherit responsibly πβ¨π
π¦ where this page comes from
- fedora 43: perl-Test-Smoke 1.84-2.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms