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

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


Author: sunnavy
Date: Tue May 12 04:33:37 2009
New Revision: 19631

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

Log:
make labels array ref, do *not* bother to parse it

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	Tue May 12 04:33:37 2009
@@ -57,31 +57,8 @@
 
                # $value here is like "-Pri-2 -Area-Unknown Pri-3 Area-BrowserUI"
                 my @items = split /\s+/, $value;
-
                 for my $value (@items) {
-                    if ( $value =~ /^-(.+)/ ) {
-                        $value = $1;
-                        if ( $value =~ /([^-]+?)-(.+)/ ) {
-                            $self->updates->{labels}{$1}{old_value} = $2;
-                        }
-                        elsif ( $value =~ /([^-]+)$/ ) {
-                            $self->updates->{labels}{$1}{old_value} = undef;
-                        }
-                        else {
-                            warn "can't parse label from $value";
-                        }
-                    }
-                    else {
-                        if ( $value =~ /([^-]+?)-(.+)/ ) {
-                            $self->updates->{labels}{$1}{new_value} = $2;
-                        }
-                        elsif ( $value =~ /([^-]+)$/ ) {
-                            $self->updates->{labels}{$1}{new_value} = undef;
-                        }
-                        else {
-                            warn "can't parse label from $value";
-                        }
-                    }
+                    push @{$self->updates->{labels}}, $value;
                 }
             }
             else {



More information about the Bps-public-commit mailing list