From a8abe4885f8535a783bdb0c7188076a272dd6182 Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Thu, 18 Aug 2016 05:41:54 +0200 Subject: Dpkg::Substvars: Add new method set_field_substvars() Refactor the ad-code in Dpkg::Control::HashCore to use this new method. --- scripts/Dpkg/Control/HashCore.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'scripts/Dpkg/Control') diff --git a/scripts/Dpkg/Control/HashCore.pm b/scripts/Dpkg/Control/HashCore.pm index 46e3dfddd..e947d9179 100644 --- a/scripts/Dpkg/Control/HashCore.pm +++ b/scripts/Dpkg/Control/HashCore.pm @@ -402,9 +402,7 @@ sub apply_substvars { my ($self, $substvars, %opts) = @_; # Add substvars to refer to other fields - foreach my $f (keys %$self) { - $substvars->set_as_auto("F:$f", $self->{$f}); - } + $substvars->set_field_substvars($self, 'F'); foreach my $f (keys %$self) { my $v = $substvars->substvars($self->{$f}, %opts); -- cgit v1.2.3