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

sunnavy at bestpractical.com sunnavy at bestpractical.com
Mon May 18 22:46:08 EDT 2009


Author: sunnavy
Date: Mon May 18 22:46:08 2009
New Revision: 19714

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

Log:
take care if value of some metadata is absent

Modified: Net-Google-Code/trunk/lib/Net/Google/Code/Issue/Comment.pm
==============================================================================
--- Net-Google-Code/trunk/lib/Net/Google/Code/Issue/Comment.pm	(original)
+++ Net-Google-Code/trunk/lib/Net/Google/Code/Issue/Comment.pm	Mon May 18 22:46:08 2009
@@ -37,7 +37,13 @@
         while (@$content) {
             my $tag   = shift @$content;
             my $value = shift @$content;
+            if ( ref $value && $value->as_HTML =~ m!<br />! ) {
+                # this happens when there's no value for $tag
+                $value = '';
+            }
+            else {
             shift @$content;    # this is for the <br>
+            }
 
             my $key = $tag->content_array_ref->[0];
             $key   =~ s/:$//;



More information about the Bps-public-commit mailing list