[SCM] Debian package checker branch, master, updated. 2.5.11-21-g76383d3
The following commit has been merged in the master branch:
commit 2fbd7aed1643b6310e9eeb293e971e0f8573519f
Author: Niels Thykier <niels@thykier.net>
Date: Sun Dec 30 15:15:44 2012 +0100
L::R::Version: Add prototype to versions_comparator
Perl's sort expects that comparators either accept arguments as the $a
and $b package globals OR has a prototype of '($$)'. The former is
faster, but somewhat limits the scope of the function.
Signed-off-by: Niels Thykier <niels@thykier.net>
diff --git a/lib/Lintian/Relation/Version.pm b/lib/Lintian/Relation/Version.pm
index 0fe9b6b..bf0c566 100644
--- a/lib/Lintian/Relation/Version.pm
+++ b/lib/Lintian/Relation/Version.pm
@@ -173,7 +173,9 @@ versions:
=cut
-sub versions_comparator {
+# Use a prototype to avoid confusing Perl when used with sort.
+
+sub versions_comparator ($$) {
my ($p, $q) = @_;
return $versioning->compare ($p, $q);
}
--
Debian package checker
Reply to: