]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/blobdiff - lib/Test/Valgrind/Parser/XML/Twig.pm
Miscellanous doc nits
[perl/modules/Test-Valgrind.git] / lib / Test / Valgrind / Parser / XML / Twig.pm
index f3e268fd3af28822c266f6cd4d2ec16a95a2d037..7d5bf66e01c91029a1e836892ed9647d49983b53 100644 (file)
@@ -15,6 +15,13 @@ Version 1.10
 
 our $VERSION = '1.10';
 
+=head1 DESCRIPTION
+
+This subclass of L<XML::Twig> and L<Test::Valgrind::Parser::XML> encapsulates an L<XML::Twig> parser inside the L<Test::Valgrind::Parser> framework.
+It is able to parse the XML output from C<valgrind> up to protocol version 4 and to generate the appropriate reports accordingly.
+
+=cut
+
 use Scalar::Util ();
 
 use base qw/Test::Valgrind::Parser::XML Test::Valgrind::Carp XML::Twig/;
@@ -49,7 +56,8 @@ sub stash { shift->{Stash} }
 
 =head2 C<protocol_version>
 
-The version of the protocol that the stream is currently conforming to.
+The version of the protocol that the current stream is conforming to.
+It is reset before and after the parsing phase, so it's effectively only available from inside L</parse>.
 
 =cut
 
@@ -71,9 +79,13 @@ sub start {
 sub parse {
  my ($self, $sess, $fh) = @_;
 
+ $self->protocol_version(undef);
+
  $self->XML::Twig::parse($fh);
  $self->purge;
 
+ $self->protocol_version(undef);
+
  return;
 }