"new"
my $tvc = Test::Valgrind::Command->new(
command => $command,
args => \@args,
);
Creates a new command object of type $command by requiring and redispatching the method call to the
module named $command if it contains '::' or to "Test::Valgrind::Command::$command" otherwise. The class
represented by $command must inherit this class.
The "args" key is used to initialize the "args" accessor.
"new_trainer"
Creates a new command object suitable for generating suppressions.
Defaults to return "undef", which skips suppression generation.
"args"
my @args = $tvc->args($session);
Returns the list of command-specific arguments that are to be passed to "valgrind".
Defaults to return the contents of the "args" option.
"env"
my $env = $tvc->env($session);
This event is called in scalar context before the command is ran, and the returned value goes out of
scope when the analysis ends. It's useful for e.g. setting up %ENV for the child process by returning an
Env::Sanctify object, hence the name.
Defaults to void.
"suppressions_tag"
my $tag = $tvc->suppressions_tag($session);
Returns a identifier that will be used to pick up the right suppressions for running the command, or
"undef" to indicate that no special suppressions are needed.
This method must be implemented when subclassing.
"check_suppressions_file"
my $supp_ok = $tvc->check_suppressions_file($file);
Returns a boolean indicating whether the suppressions contained in $file are compatible with the command.
Defaults to true.
"filter"
my $filtered_report = $tvc->filter($session, $report);
The $session calls this method after receiving a report from the tool and before forwarding it to the
action. You can either return a mangled $report (which does not need to be a clone of the original) or
"undef" if you want the action to ignore it completely.
Defaults to the identity function.