[SCM] Debian package checker branch, master, updated. 2.5.11-106-g3850dc7
The following commit has been merged in the master branch:
commit 3850dc77e0a33d96f55b7acc0c6adb392261ae3c
Author: Niels Thykier <niels@thykier.net>
Date: Sun Jan 27 12:11:02 2013 +0100
L::ProcessableGroup: Remove context based ret value
Remove "context-based" return value from get_processables. The
context was not always properly respected nor was it used.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/lib/Lintian/ProcessableGroup.pm b/lib/Lintian/ProcessableGroup.pm
index ad6f416..9801e55 100644
--- a/lib/Lintian/ProcessableGroup.pm
+++ b/lib/Lintian/ProcessableGroup.pm
@@ -200,9 +200,6 @@ all binaries (if any) and all udebs (if any).
This order is based on the original order that Lintian processed
packages in and some parts of the code relies on this order.
-In scalar context, this will return a copy to a list ref containing
-the processables.
-
Note if $type is given, then only processables of that type is
returned.
@@ -214,8 +211,7 @@ sub get_processables {
if (defined $type){
# We only want $type
if ($type eq 'changes' or $type eq 'source'){
- push @result, $self->{$type} if defined $self->{$type};
- return @result;
+ return $self->{$type} if defined $self->{$type};
}
return values %{$self->{$type}} if $type eq 'binary' or $type eq 'udeb';
fail "Unknown type of processable: $type";
@@ -231,7 +227,7 @@ sub get_processables {
foreach my $type (qw(binary udeb)){
push @result, values %{$self->{$type}} if (exists $self->{$type});
}
- return wantarray ? @result : \@result;
+ return @result;
}
=item $group->remove_processable($proc)
--
Debian package checker
Reply to: