Test::...Captor(3pm)
β¨ NAME β¨
Test::Valgrind::Action::Captor β a mock Test::Valgrind::Action whose whole personality is capturing output π
πΈ VERSION πΈ
Version 1.19 bestie, we're on 1.19 π
π¦ DESCRIPTION π¦
Okay so this class is literally a little stash of helpers for saving, redirecting and restoring filehandles. That's it. That's the whole job. She's a stagehand, not the main character π
Real talk: it is NOT meant to be used directly as an action. Do not cast her in the lead role. She will not serve. π
π METHODS π
π new
Just a croaking stub, fr fr π β she exists purely to remind you not to use this class as a real action. She's not being rude, she's being clear. Boundaries, periodt.
π save_fh
$tva->save_fh($from, $mode);
$tva->save_fh($from, $mode, $to);
Saves the original filehandle $from that was opened with mode $mode π and then redirects it β to $to if $to is defined, or to /dev/null otherwise π³οΈβ¨
Like, if you don't tell her where to send it, she's sending it straight to the void. Iconic behaviour honestly.
π restore_all_fh
$tva->restore_all_fh;
Puts every single filehandle that got saved via save_fh back to its original state π«Ά It's the un-doing. The putting-back. The "we were never here" of it all π
Important detail: the redirections aren't closed. She restores, she does not clean up after you. That's your business, bestie.
β SEE ALSO β
- Test::Valgrind
- Test::Valgrind::Action
- Capture::Tiny
π AUTHOR π
Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>.
You can contact him by mail π§ or on "irc.perl.org" (vincent) β iykyk, the IRC girlies know π
π BUGS π
Found a bug? Have a feature request? Please report it to "bug-test-valgrind at rt.cpan.org", or slide through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Valgrind> π
He will be notified, and then you'll automatically be notified of progress on your bug as he makes changes. It's giving mutuals. It's giving updates. We love a feedback loop β¨
π§ SUPPORT π§
You can find the documentation for this module with the perldoc command, bestie:
perldoc Test::Valgrind::Action::Captor
Go read it. Treat yourself. ππ
π COPYRIGHT & LICENSE π
Copyright 2009,2010,2011,2013,2015,2016 Vincent Pit, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Slay, legally speaking π«Ά
That's the whole page, babe β running on perl v5.40.1, dated 2025-04-13, and yes that footer is giving "User Contributed Perl Documentation" energy π byeee ππ
π¦ where this page comes from
- debian trixie: libtest-valgrind-perl 1.19-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtest-valgrind-perl 1.19-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtest-valgrind-perl 1.19-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms