The following commit has been merged in the master branch:
commit 2607c560ee936f5dbe713333cae81c75e769f6b5
Author: Niels Thykier <[email protected]>
Date: Mon Jul 22 21:47:07 2013 +0200
L::Relation: Use join instead of for + str concat
Signed-off-by: Niels Thykier <[email protected]>
diff --git a/lib/Lintian/Relation.pm b/lib/Lintian/Relation.pm
index 523d80a..0a7018e 100644
--- a/lib/Lintian/Relation.pm
+++ b/lib/Lintian/Relation.pm
@@ -723,19 +723,15 @@ sub unparse {
}
return $text;
} elsif ($relation->[0] eq 'AND' || $relation->[0] eq 'OR') {
- my $seperator = ($relation->[0] eq 'AND') ? ', ' : ' | ';
- my $text = '';
- for my $element (@$relation[1 .. $#$relation]) {
- $text .= $seperator if $text;
- my $result = $self->unparse($element);
- return unless defined($result);
- $text .= $result;
- }
- return $text;
+ my $separator = ($relation->[0] eq 'AND') ? ', ' : ' | ';
+ return join($separator, map {
+ $self->unparse($_);
+ } @$relation[1 .. $#$relation]);
} elsif ($relation->[0] eq 'NOT') {
return '! ' . $self->unparse($relation->[1]);
} else {
- return;
+ require Carp;
+ Carp::confess("Case $relation->[0] not implemented");
}
}
--
Debian package checker
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]