From 14403676c72b7d05b7f0c7d408b6e154e0c3c9ee Mon Sep 17 00:00:00 2001 From: gibus Date: Mon, 10 Feb 2020 23:03:34 +0100 Subject: [PATCH] Overwrite output of enclosures to have attributes in fixed order --- podcasts/scripts/feed2lav.pl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/podcasts/scripts/feed2lav.pl b/podcasts/scripts/feed2lav.pl index 31be522..d2da595 100755 --- a/podcasts/scripts/feed2lav.pl +++ b/podcasts/scripts/feed2lav.pl @@ -24,6 +24,23 @@ use XML::RSS; use DateTime; use DateTime::Format::DateParse; +{ + # Overwrite output of enclosures to have attributes in fixed order + no warnings qw(redefine); + sub XML::RSS::Private::Output::Base::_out_single_item_enclosure { + my ($self, $item, $enc) = @_; + + return + $self->_out( + "_encode($enc->{$_}) . '"' } sort keys(%$enc) + ) . + " />\n" + ); + } +} + # Configuration variables my $url = "https://www.april.org/taxonomy_all_items/term/1918/all"; my $urlfeed = "https://www.april.org/taxonomy_all_items/term/1918/all/feed";