]> git.vpit.fr Git - perl/modules/Test-Valgrind.git/commitdiff
Reset the ->protocol_version before and after parsing
authorVincent Pit <vince@profvince.com>
Sat, 26 Sep 2009 09:30:28 +0000 (11:30 +0200)
committerVincent Pit <vince@profvince.com>
Sat, 26 Sep 2009 09:30:28 +0000 (11:30 +0200)
lib/Test/Valgrind/Parser/XML/Twig.pm

index f3e268fd3af28822c266f6cd4d2ec16a95a2d037..ff72c3064476c5cf57bdb74ca864878ff38831dd 100644 (file)
@@ -50,6 +50,7 @@ sub stash { shift->{Stash} }
 =head2 C<protocol_version>
 
 The version of the protocol that the stream is currently conforming to.
+It is reset before and after the parsing phase, so it's effectively only available from inside L</parse>.
 
 =cut
 
@@ -71,9 +72,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;
 }