Test::...::Tool(3pm)
π NAME π
Test::Valgrind::Tool β bestie, this is the base class for all the Test::Valgrind tools. It's the blueprint, the template, the moment π
β¨ VERSION β¨
Version 1.19 β that's the one, no cap π«Ά
πΈ DESCRIPTION πΈ
Okay so, this class is literally the base for all the Test::Valgrind tools. It's giving founder energy π
What do these tools actually do? They wrap around valgrind tools by parsing its output and sending reports to the parent session whenever an error occurs. And they're expected to function both in suppressions generation and in analysis mode β versatile icon behavior, we love to see it β¨
π METHODS π
requires_version
my $required_version = $tvt->requires_version;
The minimum valgrind version you need to run this tool. Defaults to 3.1.0. So if your valgrind is ancient, that's a vibe check fail, sorry bestie π
new
my $tvt = Test::Valgrind::Tool->new(tool => $tool);
Makes a shiny new tool object of type $tool by requiring and redispatching the method call to the module named $tool if it contains '::', or to Test::Valgrind::Tool::$tool otherwise. The class that $tool represents must inherit this class β family only, periodt π
new_trainer
my $tvt_train = Test::Valgrind::Tool->new_trainer;
Creates a new tool object that's suitable for generating suppressions.
Defaults to returning undef, which skips suppression generation entirely. Not me just dipping out π
parser_class
my $parser_class = $tvt->parser_class($session);
Returns the class from which the parser for this tool's output is going to be instantiated.
This method must be implemented when subclassing. No skipping, bestie, it's required π«Ά
report_class
my $report_class = $tvt->report_class($session);
Returns the class in which suppression reports generated by this tool will be blessed. Fancy β¨
This method must be implemented when subclassing. Again. Required. Periodt.
args
my @args = $tvt->args($session);
Returns the list of tool-specific arguments that get passed to valgrind. Heads up though β all the suppression arguments are already handled by the session, so don't you dare duplicate them π
Defaults to the empty list.
suppressions_tag
my $tag = $tvt->suppressions_tag($session);
Returns an identifier that's used to pick up the right suppressions for running the tool, or undef to say "nah, no special suppressions needed here." Literally the chill option π
This method must be implemented when subclassing. Three for three, you got this π
start
$tvt->start($session);
Called when the $session starts. It's giving opening ceremony π
Defaults to setting started in Test::Valgrind::Component.
filter
my $filtered_report = $tvt->filter($session, $report);
The $session calls this method after receiving a report from the parser and before letting the command filter it. You can either return a mangled $report β and ngl it does not need to be a clone of the original, do whatever β or return undef if you want the action to ignore it completely. Bye bye report π
Defaults to the identity function.
finish
$tvt->finish($session);
Called when the $session finishes. Closing credits energy π¦
Defaults to clearing started in Test::Valgrind::Component.
π SEE ALSO π
Test::Valgrind, Test::Valgrind::Component, Test::Valgrind::Session.
The whole squad, fr fr π
π AUTHOR π
Vincent Pit, "<perl at profvince.com>", <http://www.profvince.com>.
You can contact me by mail or on irc.perl.org (vincent). Slide into the IRC, iykyk π¬
π BUGS π
Please report any bugs or feature requests to "bug-test-valgrind at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Valgrind>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. Look at that communication, we love a responsive king π«Ά
π SUPPORT π
You can find documentation for this module with the perldoc command.
perldoc Test::Valgrind::Tool
Go read the docs bestie, it's literally right there πβ¨
π 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.
Okay that's the whole page, you ate that π Generated for perl v5.40.1 on 2025-04-13, straight out of the User Contributed Perl Documentation. Byeee, go write a subclass πβ¨
π¦ 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