=head1 DEPENDENCIES
-Valgrind 3.1.0 (L<http://valgrind.org>).
-
L<XML::Twig>, L<version>, L<File::HomeDir>, L<Env::Sanctify>, L<Perl::Destruct::Level>.
=head1 SEE ALSO
All the C<Test::Valgrind::*> API, including L<Test::Valgrind::Command>, L<Test::Valgrind::Tool>, L<Test::Valgrind::Action> and L<Test::Valgrind::Session>.
+The C<valgrind(1)> man page.
+
L<Test::LeakTrace>.
L<Devel::Leak>, L<Devel::LeakTrace>, L<Devel::LeakTrace::Fast>.
use strict;
use warnings;
+=head1 NAME
+
+Test::Valgrind::Parser::XML::Twig - Parse valgrind XML output with XML::Twig.
+
+=head1 VERSION
+
+Version 1.10
+
+=cut
+
our $VERSION = '1.10';
use Scalar::Util ();
'/valgrindoutput/error' => \&handle_error,
);
+=head1 METHODS
+
+=cut
+
sub new {
my $class = shift;
$class = ref($class) || $class;
sub stash { shift->{Stash} }
+=head2 C<protocol_version>
+
+The version of the protocol that the stream is currently conforming to.
+
+=cut
+
eval "sub $_ { \@_ <= 1 ? \$_[0]->{$_} : (\$_[0]->{$_} = \$_[1]) }"
for qw/_session protocol_version/;
$twig->purge;
}
+=head1 SEE ALSO
+
+L<Test::Valgrind>, L<Test::Valgrind::Parser>, L<Test::Valgrind::Parser::XML>.
+
+L<XML::Twig>.
+
+=head1 AUTHOR
+
+Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
+
+You can contact me by mail or on C<irc.perl.org> (vincent).
+
+=head1 BUGS
+
+Please report any bugs or feature requests to C<bug-test-valgrind at rt.cpan.org>, or through the web interface at L<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.
+
+=head1 SUPPORT
+
+You can find documentation for this module with the perldoc command.
+
+ perldoc Test::Valgrind::Parser::XML::Twig
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2009 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.
+
+=cut
+
# End of Test::Valgrind::Parser::XML::Twig
package Test::Valgrind::Parser::XML::Twig::Elt;
=head1 DESCRIPTION
-This tool parses the XML output of a C<memcheck> run with L<XML::Twig>.
+This class contains the information required by the session for running the C<memcheck> tool.
=cut
L<Test::Valgrind>, L<Test::Valgrind::Tool>.
-L<XML::Twig>.
-
=head1 AUTHOR
Vincent Pit, C<< <perl at profvince.com> >>, L<http://www.profvince.com>.
my $trustparents = { coverage_class => 'Pod::Coverage::CountParents' };
-plan tests => 16;
+plan tests => 21;
pod_coverage_ok('Test::Valgrind');
pod_coverage_ok('Test::Valgrind::Command::Perl', $trustparents);
pod_coverage_ok('Test::Valgrind::Command::PerlScript', $trustparents);
-pod_coverage_ok('Test::Valgrind::Parser::Suppressions::Text');
+pod_coverage_ok('Test::Valgrind::Component');
+
+pod_coverage_ok('Test::Valgrind::Parser');
+pod_coverage_ok('Test::Valgrind::Parser::Suppressions::Text', $trustparents);
+pod_coverage_ok('Test::Valgrind::Parser::Text', $trustparents);
+pod_coverage_ok('Test::Valgrind::Parser::XML', $trustparents);
+pod_coverage_ok('Test::Valgrind::Parser::XML::Twig', {
+ %$trustparents,
+ also_private => [ qr/^handle_/, qw/stash/ ],
+});
pod_coverage_ok('Test::Valgrind::Report');
pod_coverage_ok('Test::Valgrind::Session');