Test::Alien::Run(3)
π Test::Alien::Run β¨
okay so bestie, you found the manual page for Test::Alien::Run(3) and honestly? it's giving "tiny class, huge main character energy." it's the run object, it holds the receipts on a process, and it's about to make your test output slay. let's get into it π«Ά
πΈ NAME πΈ
Test::Alien::Run β the Run object, no cap
β VERSION β
version 2.88 β yeah, she's been through some things and she's thriving π
π SYNOPSIS π
like, here's the vibe:
use Test2::V0;
use Test::Alien;
run_ok([ $^X, -e => 'print "some output"; exit 22'])
->exit_is(22)
->out_like(qr{some});
chaining? iconic. obsessed. π
π¦ DESCRIPTION π¦
so this class is basically a little scrapbook π β it stores all the info about a process run, the kind that Test::Alien#run_ok does.
and here's the tea, bestie, listen up: that function is the ONLY way to create an instance of this class. only. one. way. don't try to be cute and build one yourself, that's not the move π
π ATTRIBUTES π
out
my $str = $run->out;
the standard output from the run. what it said out loud, basically π£οΈβ¨
err
my $str = $run->err;
the standard error from the run. the dramatic whisper-yelling part π
exit
my $int = $run->exit;
the exit value of the run. her final answer, periodt.
signal
my $int = $run->signal;
the signal that killed the run β or zero if the process got terminated normally. so like, zero means "she left peacefully," anything else means "she was taken out" π
π METHODS π
okay so all of these methods return the run object itself, which means you can chain them like the synopsis showed off up there. chain chain chain π§β¨
success
$run->success;
$run->success($message);
passes if the process terminated normally with an exit value of 0. that's it, that's the whole vibe check π«Ά
exit_is
$run->exit_is($exit);
$run->exit_is($exit, $message);
passes if the process terminated with the given exit value. exactly that number, no substitutions β
exit_isnt
$run->exit_isnt($exit);
$run->exit_isnt($exit, $message);
passes if the process terminated with an exit value of anything but the given value. not that one. literally any other one π
out_like
$run->out_like($regex);
$run->out_like($regex, $message);
passes if the output of the run matches the given pattern. regex said yes π₯
out_unlike
$run->out_unlike($regex);
$run->out_unlike($regex, $message);
passes if the output of the run does not match the given pattern. regex said no thank u π
err_like
$run->err_like($regex);
$run->err_like($regex, $message);
passes if the standard error of the run matches the given pattern. the drama matches the script π
err_unlike
$run->err_unlike($regex);
$run->err_unlike($regex, $message);
passes if the standard error of the run does not match the given pattern. plot twist avoided β¨
note
$run->note;
sends the output and standard error as a test note. little diary entry, lowkey π
diag
$run->diag;
sends the output and standard error as a test diagnostic. same energy, but now it's officially diagnostic π
π SEE ALSO π
Test::Alienβ go read it, bestie, iykyk
π AUTHOR π
Author: Graham Ollis <plicease@cpan.org>
Contributors:
- Diab Jerius (DJERIUS)
- Roy Storey (KIWIROY)
- Ilya Pavlov
- David Mertens (run4flat)
- Mark Nunberg (mordy, mnunberg)
- Christian Walde (Mithaldu)
- Brian Wightman (MidLifeXis)
- Zaki Mughal (zmughal)
- mohawk (mohawk2, ETJ)
- Vikas N Kumar (vikasnkumar)
- Flavio Poletti (polettix)
- Salvador FandiΓ±o (salva)
- Gianni Ceccarelli (dakkar)
- Pavel Shaydo (zwon, trinitum)
- Kang-min Liu (εεΊ·ζ°, gugod)
- Nicholas Shipp (nshp)
- Juan JuliΓ‘n Merelo GuervΓ³s (JJ)
- Joel Berger (JBERGER)
- Petr PΓsaΕ (ppisar)
- Lance Wicks (LANCEW)
- Ahmad Fatoum (a3f, ATHREEF)
- JosΓ© JoaquΓn Atria (JJATRIA)
- Duke Leto (LETO)
- Shoichi Kaji (SKAJI)
- Shawn Laffan (SLAFFAN)
- Paul Evans (leonerd, PEVANS)
- HΓ₯kon HΓ¦gland (hakonhagland, HAKONH)
- nick nauwelaerts (INPHOBIA)
- Florian Weimer
- Marcel Telka (mtelka)
look at that list. a whole squad. the way they all showed up for one little run object?? we love to see it ππ
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2011-2022 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page bestie π this manual page was served up by perl v5.42.3 on 2026-09-21 β so go forth, chain those methods, and make your tests ate π
β¨π¦
π¦ where this page comes from
- fedora 43: perl-Alien-Build 2.88-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- fedora 44: perl-Alien-Build 2.88-1.fc44 Β· 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