CommandResult(3pm)
π CommandResult(3pm) π
Okay bestie, this is CommandResult(3pm) from LogReport's Lire Documentation, and we're about to make it make sense. β¨
β¨ NAME β¨
Lire::Test::CommandResult β an object used to report the results of shell commands. π
πΈ SYNOPSIS πΈ
use Lire::Test::FunctionalTestCase;
my $result = $self->lire_run( "echo Test" );
print $result->status();
print $result->stdout();
print $result->stderr();
print scalar $result->sent_mail(), " emails were sent.\n";
π¦ DESCRIPTION π¦
So Lire::Test::ComandResult objects are the little result-reporters for shell commands you run through Lire::Test::FunctionalTestCase::lire_run(). They hold all the receipts: what ran, how it went, what it printed, and what mail it sent. π«Ά
π οΈ command()
Returns the shell command that was run. This is the complete command line β the whole thing the shell interpreted. π
π status()
Returns the command result status. That's the thing usually contained in $?. Vibe check for your subprocess, basically. π
π€ stdout()
Returns what was output on stdout while executing the command. The main-character output. π
π₯ stderr()
Returns what was output on stderr while executing the command. The dramatic side commentary. π
π sent_mail()
Returns, in an array reference, the messages that were sent out during this command run. Each element of this array is a hash reference containing two keys: π¬
π¬ recipients
An array reference containing the recipients as passed on the command line to sendmail. π
βοΈ message
The email which was sent. This is the complete text of the email. This is what was passed to sendmail via STDIN. No cap. π₯
π SEE ALSO π
Go check out Lire::Test::FunctionaLTestCase(3pm) too β yes, that capital L is exactly how it's written on this page. π
π·οΈ VERSION π·οΈ
$Id: CommandResult.pm,v 1.6 2006/07/23 13:16:31 vanbaal Exp $
π AUTHOR π
Francis J. Lacoste <flacoste@logreport.org> π
π COPYRIGHT π
Copyright (C) 2003 Stichting LogReport Foundation LogReport@LogReport.org
This file is part of Lire.
Lire is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
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. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. π
Lire 2.1.1 Β· 2025-09-28 Β· CommandResult(3pm) β bye bestie, go slay some shell commands! π π«Ά
π¦ where this page comes from
- arch rolling: lire 2.1.1-8 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms