[Bps-public-commit] r19632 - Net-Google-Code/trunk/lib/Net/Google/Code

sunnavy at bestpractical.com sunnavy at bestpractical.com
Tue May 12 04:43:12 EDT 2009


Author: sunnavy
Date: Tue May 12 04:43:12 2009
New Revision: 19632

Modified:
   Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm

Log:
pop @comments_tag is not safe, let us check if it has author in it

Modified: Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm
==============================================================================
--- Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm	(original)
+++ Net-Google-Code/trunk/lib/Net/Google/Code/Issue.pm	Tue May 12 04:43:12 2009
@@ -123,9 +123,9 @@
 
     # extract comments
     my @comments_tag = $tree->look_down( class => 'vt issuecomment' );
-    pop @comments_tag;    # last one is for adding comment
     my @comments;
     for my $tag (@comments_tag) {
+        next unless $tag->look_down( class => 'author' );
         my $comment =
           Net::Google::Code::Issue::Comment->new( project => $self->project );
         $comment->parse($tag);



More information about the Bps-public-commit mailing list