Test::S...Execute(3)

πŸ“¦
version 1.84 Β· 2 versions
, in fedora 43

✨ NAME ✨

Test::Smoke::Util::Execute β€” bestie, it runs a command for you and hands back the output. That's the whole vibe. πŸ’…

It's a User Contributed Perl Documentation page, if you were wondering where you wandered into.


🌸 SYNOPSIS 🌸

use Test::Smoke::Util::Execute;

my $ex = Test::Smoke::Execute->new(
    verbose   => $level,
    command   => $command,
    arguments => [@arguments],
);
my $output = eval { $ex->run() };
if (my $error = $@) {
    croak("Error running $command: $error");
}

okay so that's literally it β€” new up the object, eval the run(), and if $@ is doing its little drama, croak with the whole story. No cap. 🫢


πŸ¦‹ DESCRIPTION πŸ¦‹

πŸ’– Test::Smoke::Util::Execute->new(%arguments)

Instantiate an object of this class. New object, who dis. ✨

Arguments

  • verbose => [0, 1, 2]
  • command => $command_to_pass_to_qx

Returns

The instantiated object. πŸŽ€


πŸ’œ $executer->full_command()

Create the full command as pass to qx(). Basically it's assembling the fit. πŸ‘‘

Arguments

None.

Returns

A string with quotes around the elements/arguments that need them. Quotation marks where they're due, periodt. πŸŽ€


πŸ”₯ $executer->run()

Run the command with backticks. The main character moment. 🌈

Arguments

None.

Returns

Context aware list or scalar.

If any error occured, "$self->exitcode" is set. (yeah, the docs said "occured" and we're keeping it fr fr πŸ’€)


⭐ $executer->exitcode

Getter that returns the exitcode. It's giving "how did it go". πŸ’…


🧚 $executer->verbose

Accessor that returns the verbose. πŸ¦‹


πŸ“ $executer->arguments

Accessor that returns the arguments. 🌸


πŸ‘‘ STUFF πŸ‘‘

(c) MMXIII - Abe Timmerman <abeltje@cpan.org> β€” icon behavior, honestly. 🫢

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. β€” no warranty bestie, we said what we said, that's the fine print, don't come for us. 😭

And that's the whole page, gorgeous. This one's riding with perl v5.42.0 and dated 2025-07-25 β€” stay slay, stay smoked, mwah πŸ’‹

πŸ“¦ where this page comes from