$self->{callers} = $callers;
- $self->{twig} = Test::Valgrind::Tool::memcheck::Twig->new(tool => $self);
-
$self;
}
sub callers { $_[0]->{callers} }
-=head2 C<twig>
-
-Read-only accessor for the underlying L<XML::Twig> parser.
-
-=cut
-
-sub twig { $_[0]->{twig} }
-
sub suppressions_tag { 'memcheck-' . $_[1]->version }
=head2 C<report_class_analysis $session>
return @args;
}
-# We must store the session in ourselves because it's only possible to pass
-# arguments to XML::Twig objects by a global stash.
-
-sub _session { @_ <= 1 ? $_[0]->{_session} : ($_[0]->{_session} = $_[1]) }
-
-sub start {
- my ($self, $sess) = @_;
-
- $self->SUPER::start($sess);
- $self->_session($sess);
-
- return;
-}
-
-sub parse_analysis {
- my ($self, $sess, $fh) = @_;
-
- my $twig = $self->twig;
- $twig->parse($fh);
- $twig->purge;
-
- return;
-}
-
-sub finish {
- my ($self, $sess) = @_;
-
- $self->_session(undef);
- $self->SUPER::finish($sess);
-
- return;
-}
-
=head1 SEE ALSO
L<Test::Valgrind>, L<Test::Valgrind::Tool>.