CommandResult(3pm)

πŸ“¦ version 2.1.1, in arch rolling

πŸ’… 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 (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