This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=ae08079b4eaa45152700c1beb73a5a786ceed06a commit ae08079b4eaa45152700c1beb73a5a786ceed06a Author: Guillem Jover <[email protected]> AuthorDate: Wed Oct 16 03:08:10 2024 +0200 Dpkg::Vendor: Simplify module loading logic If we cannot load the module, skip this loop iteration, so that it is clear what we intend, and we can reduce an indentation level as a side effect. --- scripts/Dpkg/Vendor.pm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/scripts/Dpkg/Vendor.pm b/scripts/Dpkg/Vendor.pm index e40211718..fea37f1e1 100644 --- a/scripts/Dpkg/Vendor.pm +++ b/scripts/Dpkg/Vendor.pm @@ -232,16 +232,16 @@ sub get_vendor_object { eval qq{ require $module; }; - unless ($@) { - my $obj = $module->new(); - $OBJECT_CACHE{$vendor_key} = $obj; - if (exists $obsolete_name{$name}) { - warning(g_('%s module name is deprecated; ' . - 'it should be capitalized with only alphanumeric characters'), - "Dpkg::Vendor::$name"); - } - return $obj; + next if $@; + + my $obj = $module->new(); + $OBJECT_CACHE{$vendor_key} = $obj; + if (exists $obsolete_name{$name}) { + warning(g_('%s module name is deprecated; ' . + 'it should be capitalized with only alphanumeric characters'), + "Dpkg::Vendor::$name"); } + return $obj; } my $info = get_vendor_info($vendor); -- Dpkg.Org's dpkg

