From c667a01092f6d66fae1a52933f84d46402c8fd99 Mon Sep 17 00:00:00 2001 From: Harald Hope Date: Thu, 2 Nov 2023 21:42:18 -0700 Subject: [PATCH] code cleanup --- pinxi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pinxi b/pinxi index 6afa282..2b72079 100755 --- a/pinxi +++ b/pinxi @@ -2711,8 +2711,7 @@ sub download_file { sub get_file_http_tiny { my ($type,$url,$file,$ua) = @_; $ua = ($ua && $dl{'ua'}) ? $dl{'ua'} . $ua: ''; - my %headers; - %headers = ('agent' => $ua) if $ua; + my %headers = ($ua) ? ('agent' => $ua) : (); my $tiny = HTTP::Tiny->new(%headers); # note: default is no verify, so default here actually is to verify unless overridden $tiny->verify_SSL => 1 if !$use{'no-ssl'};