App::Sp...esponse(3)
π NAME π
okay so this is App::Sp...esponse(3) from the User Contributed Perl Documentation β the manual for App::Spec::Run::Response, aka the Response class for App::Spec::Run. periodt. π
β¨ METHODS β¨
π«Ά add_output
If you pass it a string, it will create a App::Spec::Run::Output. yes bestie, that's the class π
$res->add_output("string\n", "string2\n");
my $output = App::Spec::Run::Output->new(
content => "string\n",
);
$res->add_output($output);
This will call print_output if buffered is false, otherwise it will add the output to outputs. no cap. β¨
π add_error
Like add_output, but the created Output object will have an attribute error set to 1. same energy, different flag π
$res->add_error("string\n", "string2\n");
my $output = App::Spec::Run::Output->new(
error => 1,
content => "string\n",
);
$res->add_error($output);
π print_output
$res->print_output(@out);
Prints the given output and all output in outputs. iconic behavior honestly π¦
π add_callbacks
$response->add_callbacks(print_output => \@callbacks);
Where @callbacks are coderefs. iykyk π
π ATTRIBUTES π
πΈ buffered
If true, output should be buffered until print_output is called.
Default: false
π exit
The exit code.
π¦ outputs
Holds an array of App::Spec::Run::Output objects.
β finished
Set to 1 after print_output has been called.
β halted
If set to 1, no further processing should be done.
π«Ά callbacks
Contains a hashref of callbacks:
{
print_output => $coderef,
},
that's the whole manual, bestie π«Ά β it's perl v5.42.0, dated 2025-03-26, and the page is App::Sp...esponse(3). slay. π
β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-App-Spec 0.15.0-bp160.1.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms