summaryrefslogtreecommitdiff
path: root/scripts/dpkg-mergechangelogs.pl
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2018-05-14 23:26:07 +0200
committerGuillem Jover <guillem@debian.org>2018-06-22 03:24:13 +0200
commit40eccd5c044c874cf7fa5f8dc8e2c75379395d8a (patch)
treeede6a8facb9834f4c43b7463af06ac6127de6e1a /scripts/dpkg-mergechangelogs.pl
parentaa0404293ff1a3d81353acb8c7495fe9eb382c92 (diff)
downloaddpkg-40eccd5c044c874cf7fa5f8dc8e2c75379395d8a.tar.gz
scripts: Do not use stringy eval to define different sub implementations
We can just assign an anonymous sub to the typeglob.
Diffstat (limited to 'scripts/dpkg-mergechangelogs.pl')
-rwxr-xr-xscripts/dpkg-mergechangelogs.pl10
1 files changed, 4 insertions, 6 deletions
diff --git a/scripts/dpkg-mergechangelogs.pl b/scripts/dpkg-mergechangelogs.pl
index 7fd11fc96..20b33dc75 100755
--- a/scripts/dpkg-mergechangelogs.pl
+++ b/scripts/dpkg-mergechangelogs.pl
@@ -43,12 +43,10 @@ BEGIN {
use Algorithm::Merge qw(merge);
};
if ($@) {
- eval q{
- sub merge {
- my ($o, $a, $b) = @_;
- return @$a if join("\n", @$a) eq join("\n", @$b);
- return get_conflict_block($a, $b);
- }
+ *merge = sub {
+ my ($o, $a, $b) = @_;
+ return @$a if join("\n", @$a) eq join("\n", @$b);
+ return get_conflict_block($a, $b);
};
}
}