summaryrefslogtreecommitdiff
path: root/scripts/dpkg-scansources.pl
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2015-02-28 23:45:25 +0100
committerGuillem Jover <guillem@debian.org>2015-04-10 04:42:01 +0200
commit869b66753c6b1530ef3ec7961810372b80b42397 (patch)
treec9d24d0766f2cafe90f672f755017006ebe70702 /scripts/dpkg-scansources.pl
parentf027f743929abca7c1351c5f8150e10272072415 (diff)
downloaddpkg-869b66753c6b1530ef3ec7961810372b80b42397.tar.gz
dpkg-scansources: Use proper constants instead of constant subs
Diffstat (limited to 'scripts/dpkg-scansources.pl')
-rwxr-xr-xscripts/dpkg-scansources.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/scripts/dpkg-scansources.pl b/scripts/dpkg-scansources.pl
index 96bc10ed1..5c161f6d3 100755
--- a/scripts/dpkg-scansources.pl
+++ b/scripts/dpkg-scansources.pl
@@ -37,14 +37,15 @@ textdomain('dpkg-dev');
# exit code. Only errors which affect everything cause a non-zero exit.
my $exit = 0;
-# %override is a hash of lists. The subs following describe what's in
-# the lists.
-
+# Hash of lists. The constants below describe what is in the lists.
my %override;
-sub O_PRIORITY () { 0 }
-sub O_SECTION () { 1 }
-sub O_MAINT_FROM () { 2 } # undef for non-specific, else listref
-sub O_MAINT_TO () { 3 } # undef if there's no maint override
+use constant {
+ O_PRIORITY => 0,
+ O_SECTION => 1,
+ O_MAINT_FROM => 2, # undef for non-specific, else listref
+ O_MAINT_TO => 3, # undef if there's no maint override
+};
+
my %extra_override;
my %priority = (