From 4a1759fb7699d08532dd8ce9ccc807f4f8a14f1d Mon Sep 17 00:00:00 2001 From: Giovanni Bechis Date: Tue, 10 Dec 2024 18:16:47 +0100 Subject: [PATCH] simplify code Co-authored-by: Matt Simerson --- lib/Mail/DMARC/Policy.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Mail/DMARC/Policy.pm b/lib/Mail/DMARC/Policy.pm index 2e103b4c..9b1c5173 100644 --- a/lib/Mail/DMARC/Policy.pm +++ b/lib/Mail/DMARC/Policy.pm @@ -61,7 +61,7 @@ sub stringify { my %dmarc_record = %{$self}; # "v" tag must be the first one - my $dmarc_txt = 'v=' . $dmarc_record{v} . '; '; + my $dmarc_txt = 'v=' . delete $dmarc_record{v} . '; '; foreach my $key ( keys %dmarc_record ) { next if ($key =~ /^domain|v$/); $dmarc_txt .= "$key=$dmarc_record{$key}; ";