diff -Nru libxml-rss-perl-1.60/Build.PL libxml-rss-perl-1.61/Build.PL --- libxml-rss-perl-1.60/Build.PL 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/Build.PL 2019-08-24 08:54:12.000000000 +0000 @@ -1,5 +1,5 @@ -# This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v6.011. +# This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v6.012. use strict; use warnings; @@ -19,7 +19,7 @@ "Shlomi Fish " ], "dist_name" => "XML-RSS", - "dist_version" => "1.60", + "dist_version" => "1.61", "license" => "perl", "module_name" => "XML::RSS", "recursive_test_files" => 1, diff -Nru libxml-rss-perl-1.60/Changes libxml-rss-perl-1.61/Changes --- libxml-rss-perl-1.60/Changes 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/Changes 2019-08-24 08:54:12.000000000 +0000 @@ -1,5 +1,12 @@ Revision history for Perl module XML::RSS +1.61 2019-08-24 + - Clarified the docs regarding DateTime objects. + - Thanks to shtrb + - Add 2.0 to the version list, fix broken links to versions + - Thanks to E. Choroba + - Changed to explicit imports in "use" statements. + 1.60 2018-04-03 - Convert to Dist-Zilla. - Add Travis-CI support. diff -Nru libxml-rss-perl-1.60/debian/changelog libxml-rss-perl-1.61/debian/changelog --- libxml-rss-perl-1.60/debian/changelog 2018-03-17 20:20:57.000000000 +0000 +++ libxml-rss-perl-1.61/debian/changelog 2019-11-02 03:13:38.000000000 +0000 @@ -1,3 +1,15 @@ +libxml-rss-perl (1.61-1) unstable; urgency=medium + + * Import upstream version 1.61. + * Update years of packaging copyright. + * Annotate test-only build dependencies with . + * Declare compliance with Debian Policy 4.4.1. + * Bump debhelper-compat to 12. + * debian/watch: use uscan version 4. + * Remove obsolete fields Name, Contact from debian/upstream/metadata. + + -- gregor herrmann Sat, 02 Nov 2019 04:13:38 +0100 + libxml-rss-perl (1.60-1) unstable; urgency=medium [ gregor herrmann ] diff -Nru libxml-rss-perl-1.60/debian/compat libxml-rss-perl-1.61/debian/compat --- libxml-rss-perl-1.60/debian/compat 2018-03-17 20:20:57.000000000 +0000 +++ libxml-rss-perl-1.61/debian/compat 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -10 diff -Nru libxml-rss-perl-1.60/debian/control libxml-rss-perl-1.61/debian/control --- libxml-rss-perl-1.60/debian/control 2018-03-17 20:20:57.000000000 +0000 +++ libxml-rss-perl-1.61/debian/control 2019-11-02 03:13:38.000000000 +0000 @@ -7,17 +7,17 @@ Section: perl Testsuite: autopkgtest-pkg-perl Priority: optional -Build-Depends: debhelper (>= 10), +Build-Depends: debhelper-compat (= 12), libmodule-build-perl -Build-Depends-Indep: libdatetime-format-mail-perl, - libdatetime-format-w3cdtf-perl, - libtest-differences-perl, - libtest-manifest-perl, - libtest-pod-coverage-perl, - libtest-pod-perl, - libxml-parser-perl, +Build-Depends-Indep: libdatetime-format-mail-perl , + libdatetime-format-w3cdtf-perl , + libtest-differences-perl , + libtest-manifest-perl , + libtest-pod-coverage-perl , + libtest-pod-perl , + libxml-parser-perl , perl -Standards-Version: 4.1.3 +Standards-Version: 4.4.1 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libxml-rss-perl Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libxml-rss-perl.git Homepage: https://metacpan.org/release/XML-RSS diff -Nru libxml-rss-perl-1.60/debian/copyright libxml-rss-perl-1.61/debian/copyright --- libxml-rss-perl-1.60/debian/copyright 2018-03-17 20:20:57.000000000 +0000 +++ libxml-rss-perl-1.61/debian/copyright 2019-11-02 03:13:38.000000000 +0000 @@ -16,7 +16,7 @@ 2007, Vincent Danjean 2008, Brian Cassidy 2008, Gunnar Wolf - 2008-2016, gregor herrmann + 2008-2019, gregor herrmann 2009, Jonathan Yu 2009, Ryan Niebur 2011, Nicholas Bamber diff -Nru libxml-rss-perl-1.60/debian/upstream/metadata libxml-rss-perl-1.61/debian/upstream/metadata --- libxml-rss-perl-1.60/debian/upstream/metadata 2018-03-17 20:20:57.000000000 +0000 +++ libxml-rss-perl-1.61/debian/upstream/metadata 2019-11-02 03:13:38.000000000 +0000 @@ -1,7 +1,4 @@ ---- Archive: CPAN Bug-Database: https://github.com/shlomif/perl-XML-RSS/issues -Contact: Shlomi Fish -Name: XML-RSS Repository: https://github.com/shlomif/perl-XML-RSS.git Repository-Browse: https://github.com/shlomif/perl-XML-RSS diff -Nru libxml-rss-perl-1.60/debian/watch libxml-rss-perl-1.61/debian/watch --- libxml-rss-perl-1.60/debian/watch 2018-03-17 20:20:57.000000000 +0000 +++ libxml-rss-perl-1.61/debian/watch 2019-11-02 03:13:38.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 -https://metacpan.org/release/XML-RSS .*/XML-RSS-v?(\d[\d.]+)\.(?:tar(?:\.gz|\.bz2)?|tgz|zip) +version=4 +https://metacpan.org/release/XML-RSS .*/XML-RSS-v?@ANY_VERSION@@ARCHIVE_EXT@$ diff -Nru libxml-rss-perl-1.60/dist.ini libxml-rss-perl-1.61/dist.ini --- libxml-rss-perl-1.60/dist.ini 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/dist.ini 2019-08-24 08:54:12.000000000 +0000 @@ -3,7 +3,7 @@ license = Perl_5 copyright_holder = Various copyright_year = 2001 -version = 1.60 +version = 1.61 [@Filter] -bundle = @SHLOMIF diff -Nru libxml-rss-perl-1.60/examples/0.9/create_rss.pl libxml-rss-perl-1.61/examples/0.9/create_rss.pl --- libxml-rss-perl-1.60/examples/0.9/create_rss.pl 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/examples/0.9/create_rss.pl 2019-08-24 08:54:12.000000000 +0000 @@ -1,11 +1,11 @@ -#!/usr/bin/perl -w +#!/usr/bin/perl # create_rss.pl # creates and prints RSS 0.9 file use strict; use warnings; -use XML::RSS; +use XML::RSS (); my $rss = XML::RSS->new(version => '0.9'); $rss->channel(title => "freshmeat.net", diff -Nru libxml-rss-perl-1.60/examples/convert.pl libxml-rss-perl-1.61/examples/convert.pl --- libxml-rss-perl-1.60/examples/convert.pl 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/examples/convert.pl 2019-08-24 08:54:12.000000000 +0000 @@ -3,10 +3,10 @@ use strict; use warnings; -use XML::RSS; +use XML::RSS (); # print an error unless there are 2 command-line args -&syntax unless @ARGV == 2; +syntax() unless @ARGV == 2; # get rss file and version to convert to from # the command line diff -Nru libxml-rss-perl-1.60/examples/rss_info.pl libxml-rss-perl-1.61/examples/rss_info.pl --- libxml-rss-perl-1.60/examples/rss_info.pl 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/examples/rss_info.pl 2019-08-24 08:54:12.000000000 +0000 @@ -8,7 +8,7 @@ use strict; use warnings; -use XML::RSS; +use XML::RSS (); my $rss = XML::RSS->new; $rss->parsefile(shift); diff -Nru libxml-rss-perl-1.60/examples/update_rss.pl libxml-rss-perl-1.61/examples/update_rss.pl --- libxml-rss-perl-1.60/examples/update_rss.pl 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/examples/update_rss.pl 2019-08-24 08:54:12.000000000 +0000 @@ -4,7 +4,7 @@ use strict; use warnings; -use XML::RSS; +use XML::RSS (); die "Syntax: update_rss.pl source.rdf destination.rdf\n\n" unless @ARGV == 2; diff -Nru libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/Base.pm libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/Base.pm --- libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/Base.pm 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/Base.pm 2019-08-24 08:54:12.000000000 +0000 @@ -1,15 +1,15 @@ package XML::RSS::Private::Output::Base; -$XML::RSS::Private::Output::Base::VERSION = '1.60'; +$XML::RSS::Private::Output::Base::VERSION = '1.61'; use strict; use warnings; -use Carp; +use Carp qw/ confess /; use HTML::Entities qw(encode_entities_numeric encode_entities); -use DateTime::Format::Mail; -use DateTime::Format::W3CDTF; +use DateTime::Format::Mail (); +use DateTime::Format::W3CDTF (); -use XML::RSS; +use XML::RSS (); sub new { my $class = shift; @@ -44,12 +44,10 @@ return $self->{_encode_cb}; } -sub _item_idx -{ +sub _item_idx { my $self = shift; - if (@_) - { + if (@_) { $self->{_item_idx} = shift; } @@ -62,6 +60,7 @@ $self->{_output} = ""; $self->_main($args->{main}); + # TODO : Remove once we have inheritance proper. $self->_rss_out_version($args->{version}); if (defined($args->{encode_cb})) { @@ -130,9 +129,7 @@ foreach my $key (keys %inner_copy) { my $value = $inner->{$key}; if (defined($value)) { - $attr .= " " . $self->_encode($key) . qq{="} - . $self->_encode($value) . '"' - ; + $attr .= " " . $self->_encode($key) . qq{="} . $self->_encode($value) . '"'; } } } @@ -154,39 +151,28 @@ my @subtags; - if (ref($inner) eq "HASH") - { + if (ref($inner) eq "HASH") { $self->_out("<${prefix}:${tag}"); - foreach my $attr (sort { $a cmp $b } keys(%{$inner})) - { - if (ref($inner->{$attr}) eq '') - { - $self->_out( - q{ } - . $self->_sanitize($attr) - . q{="} - . $self->_encode($inner->{$attr}) - . q{"} - ); + foreach my $attr (sort { $a cmp $b } keys(%{$inner})) { + if (ref($inner->{$attr}) eq '') { + $self->_out(q{ } + . $self->_sanitize($attr) . q{="} + . $self->_encode($inner->{$attr}) + . q{"}); } - else - { - push(@subtags,$attr); + else { + push(@subtags, $attr); } } - if (! @subtags) - { + if (!@subtags) { $self->_out("/>\n"); } - else - { + else { $self->_out(">\n"); - foreach my $attr (sort { $a cmp $b } @subtags) - { - if (ref($inner->{$attr})) - { + foreach my $attr (sort { $a cmp $b } @subtags) { + if (ref($inner->{$attr})) { _out_ns_tag($self, $prefix, $tag, $inner->{$attr}); } } @@ -194,12 +180,10 @@ $self->_out("\n"); } } - elsif (ref($inner) eq 'ARRAY') - { - map { $self->_out_ns_tag($prefix, $tag, $_) } @{ $inner }; + elsif (ref($inner) eq 'ARRAY') { + map { $self->_out_ns_tag($prefix, $tag, $_) } @{$inner}; } - else - { + else { return $self->_out_tag("${prefix}:${tag}", $inner); } } @@ -218,8 +202,7 @@ my ($self, $tag, $inner) = @_; if (ref($inner) eq "ARRAY") { - foreach my $elem (@$inner) - { + foreach my $elem (@$inner) { $self->_out_defined_tag($tag, $elem); } } @@ -306,9 +289,7 @@ my $master_tag = $self->_get_textinput_tag(); if (defined(my $link = $self->textinput('link'))) { - $self->_start_top_elem($master_tag, - sub { $link } - ); + $self->_start_top_elem($master_tag, sub {$link}); $self->_output_common_textinput_sub_elements(); @@ -333,9 +314,6 @@ } - - - sub _date_from_dc_date { my ($self, $string) = @_; my $f = DateTime::Format::W3CDTF->new(); @@ -362,8 +340,7 @@ return $pf->format_datetime($date); } -sub _channel_dc -{ +sub _channel_dc { my ($self, $key) = @_; if ($self->channel('dc')) { @@ -374,8 +351,7 @@ } } -sub _channel_syn -{ +sub _channel_syn { my ($self, $key) = @_; if ($self->channel('syn')) { @@ -391,8 +367,7 @@ if (defined(my $d = $self->_channel_dc('date'))) { return $self->_date_to_rss2($self->_date_from_dc_date($d)); } - else - { + else { # If lastBuildDate is undef we can still return it because we # need to return undef. return $self->channel("lastBuildDate"); @@ -448,7 +423,8 @@ sub _output_xml_declaration { my $self = shift; - my $encoding = (defined $self->_main->_encoding())? ' encoding="' . $self->_main->_encoding() . '"' : ""; + my $encoding = + (defined $self->_main->_encoding()) ? ' encoding="' . $self->_main->_encoding() . '"' : ""; $self->_out('' . "\n"); if (defined(my $stylesheet = $self->_main->_stylesheet)) { my $style_url = $self->_encode($stylesheet); @@ -484,7 +460,7 @@ my $tag = "item"; my $base = $item->{'xml:base'}; $tag .= qq{ xml:base="$base"} if defined $base; - $self->_start_top_elem($tag, sub { $self->_get_item_about($item)}); + $self->_start_top_elem($tag, sub { $self->_get_item_about($item) }); $self->_output_common_item_tags($item); @@ -546,9 +522,8 @@ my $defined = $self->_get_item_defined; - if (! $defined) { - foreach my $f (@fields) - { + if (!$defined) { + foreach my $f (@fields) { if (!defined($item->{$f})) { die qq/Item No. / . $self->_item_idx() . qq/ is missing the "$f" field./; } @@ -611,8 +586,7 @@ sub _calc_channel_dc_field_params { my ($self, $dc_key, $non_dc_key) = @_; - return - ( + return ( $self->_prefer_dc() ? "dc:$dc_key" : $non_dc_key, $self->_calc_channel_dc_field($dc_key, $non_dc_key) ); @@ -621,17 +595,13 @@ sub _out_channel_dc_field { my ($self, $dc_key, $non_dc_key) = @_; - return $self->_out_defined_tag( - $self->_calc_channel_dc_field_params($dc_key, $non_dc_key), - ); + return $self->_out_defined_tag($self->_calc_channel_dc_field_params($dc_key, $non_dc_key),); } sub _out_channel_array_self_dc_field { my ($self, $key) = @_; - $self->_out_array_tag( - $self->_calc_channel_dc_field_params($key, $key), - ); + $self->_out_array_tag($self->_calc_channel_dc_field_params($key, $key),); } sub _out_channel_self_dc_field { @@ -713,19 +683,17 @@ return; } -sub _out_module_prefix_elements_hash -{ +sub _out_module_prefix_elements_hash { my ($self, $args) = @_; my $prefix = $args->{prefix}; - my $data = $args->{data}; - my $url = $args->{url}; + my $data = $args->{data}; + my $url = $args->{url}; while (my ($el, $value) = each(%$data)) { $self->_out_module_prefix_pair( - { - %$args, - el => $el, + { %$args, + el => $el, val => $value, } ); @@ -734,19 +702,17 @@ return; } -sub _out_module_prefix_pair -{ +sub _out_module_prefix_pair { my ($self, $args) = @_; my $prefix = $args->{prefix}; - my $url = $args->{url}; + my $url = $args->{url}; - my $el = $args->{el}; + my $el = $args->{el}; my $value = $args->{val}; - if ($self->_main->_is_rdf_resource($el,$url)) { - $self->_out( - qq{<${prefix}:${el} rdf:resource="} . $self->_encode($value) . qq{" />\n}); + if ($self->_main->_is_rdf_resource($el, $url)) { + $self->_out(qq{<${prefix}:${el} rdf:resource="} . $self->_encode($value) . qq{" />\n}); } else { $self->_out_ns_tag($prefix, $el, $value); @@ -755,35 +721,32 @@ return; } -sub _out_module_prefix_elements_array -{ +sub _out_module_prefix_elements_array { my ($self, $args) = @_; my $prefix = $args->{prefix}; - my $data = $args->{data}; - my $url = $args->{url}; + my $data = $args->{data}; + my $url = $args->{url}; - foreach my $element (@$data) - { + foreach my $element (@$data) { $self->_out_module_prefix_pair( - { - %$args, - el => $element->{'el'}, + { %$args, + el => $element->{'el'}, val => $element->{'val'}, } - ) + ); } return; } -sub _out_module_prefix_elements -{ +sub _out_module_prefix_elements { my ($self, $args) = @_; my $data = $args->{'data'}; - if (! $data) { + if (!$data) { + # Do nothing - empty data return; } @@ -807,10 +770,9 @@ next if $prefix =~ /^(dc|syn|taxo)$/; $self->_out_module_prefix_elements( - { - prefix => $prefix, - url => $url, - data => $super_elem->{$prefix}, + { prefix => $prefix, + url => $url, + data => $super_elem->{$prefix}, } ); @@ -845,8 +807,7 @@ return shift->_out_skip_tag("day"); } -sub _get_item_about -{ +sub _get_item_about { my ($self, $item) = @_; return defined($item->{'about'}) ? $item->{'about'} : $item->{'link'}; } @@ -889,14 +850,13 @@ sub _is_image_defined { my $self = shift; - return defined ($self->image('url')); + return defined($self->image('url')); } sub _output_complete_image { my $self = shift; - if ($self->_is_image_defined()) - { + if ($self->_is_image_defined()) { $self->_output_defined_image(); } } @@ -916,9 +876,7 @@ die qq/Item No. $idx is missing "about" or "link" fields./; } - $self->_out(' ' . "\n"); + $self->_out(' ' . "\n"); } continue { $idx++; @@ -931,14 +889,12 @@ return (); } -sub _get_rdf_decl_mappings -{ +sub _get_rdf_decl_mappings { my $self = shift; my $modules = $self->_modules(); - return - [ + return [ $self->_get_first_rdf_decl_mappings(), sort { $a->[0] cmp $b->[0] } map { [$modules->{$_}, $_] } keys(%$modules) ]; @@ -955,11 +911,7 @@ sub _get_rdf_xmlnses { my $self = shift; - return - join("", - map { $self->_render_xmlns(@$_) } - @{$self->_get_rdf_decl_mappings} - ); + return join("", map { $self->_render_xmlns(@$_) } @{$self->_get_rdf_decl_mappings}); } sub _get_rdf_decl_open_tag { @@ -967,17 +919,14 @@ } -sub _get_rdf_decl -{ - my $self = shift; - my $base = $self->_main()->{'xml:base'}; - my $base_decl = (defined $base)? qq{ xml:base="$base"\n} : ""; - return $self->_get_rdf_decl_open_tag() . $base_decl . - $self->_get_rdf_xmlnses() . ">\n\n"; +sub _get_rdf_decl { + my $self = shift; + my $base = $self->_main()->{'xml:base'}; + my $base_decl = (defined $base) ? qq{ xml:base="$base"\n} : ""; + return $self->_get_rdf_decl_open_tag() . $base_decl . $self->_get_rdf_xmlnses() . ">\n\n"; } -sub _out_rdf_decl -{ +sub _out_rdf_decl { my $self = shift; return $self->_out($self->_get_rdf_decl); @@ -993,9 +942,10 @@ for my $guid (qw(permaLink guid)) { if (defined $item->{$guid}) { $self->_out('' - . $self->_encode($item->{$guid}) - . '' . "\n"); + . ($guid eq 'permaLink' ? 'true' : 'false') . '">' + . $self->_encode($item->{$guid}) + . '' + . "\n"); last; } } @@ -1006,34 +956,26 @@ if (defined $item->{source} && defined $item->{sourceUrl}) { $self->_out('' - . $self->_encode($item->{source}) - . "\n"); + . $self->_encode($item->{sourceUrl}) . '">' + . $self->_encode($item->{source}) + . "\n"); } } sub _out_single_item_enclosure { my ($self, $item, $enc) = @_; - return - $self->_out( - "_encode($enc->{$_}) . '"' } keys(%$enc) - ) . - " />\n" - ); + return $self->_out("_encode($enc->{$_}) . '"' } keys(%$enc)) + . " />\n"); } sub _out_item_enclosure { my ($self, $item) = @_; if (my $enc = $item->{enclosure}) { - foreach my $sub ( - (ref($enc) eq "ARRAY") ? @$enc : ($enc) - ) - { - $self->_out_single_item_enclosure($item, $sub) + foreach my $sub ((ref($enc) eq "ARRAY") ? @$enc : ($enc)) { + $self->_out_single_item_enclosure($item, $sub); } } } @@ -1074,7 +1016,7 @@ $self->_output_single_item($item); } continue { - $self->_item_idx($self->_item_idx()+1); + $self->_item_idx($self->_item_idx() + 1); } } @@ -1153,16 +1095,13 @@ sub _out_dates { my $self = shift; - $self->_out_defined_tag("pubDate", $self->_calc_pubDate()); + $self->_out_defined_tag("pubDate", $self->_calc_pubDate()); $self->_out_defined_tag("lastBuildDate", $self->_calc_lastBuildDate()); } sub _out_def_chan_tag { my ($self, $tag) = @_; - return $self->_output_multiple_tags( - {ext => "channel", 'defined' => 1}, - [ $tag ], - ); + return $self->_output_multiple_tags({ext => "channel", 'defined' => 1}, [$tag],); } # $self->_render_complete_rss_output($xml_version) @@ -1212,7 +1151,7 @@ =head1 VERSION -version 1.60 +version 1.61 =head1 METHODS diff -Nru libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/Roles/ImageDims.pm libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/Roles/ImageDims.pm --- libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/Roles/ImageDims.pm 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/Roles/ImageDims.pm 2019-08-24 08:54:12.000000000 +0000 @@ -1,5 +1,5 @@ package XML::RSS::Private::Output::Roles::ImageDims; -$XML::RSS::Private::Output::Roles::ImageDims::VERSION = '1.60'; +$XML::RSS::Private::Output::Roles::ImageDims::VERSION = '1.61'; use strict; use warnings; @@ -21,7 +21,7 @@ =head1 VERSION -version 1.60 +version 1.61 =head1 AUTHOR diff -Nru libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/Roles/ModulesElems.pm libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/Roles/ModulesElems.pm --- libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/Roles/ModulesElems.pm 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/Roles/ModulesElems.pm 2019-08-24 08:54:12.000000000 +0000 @@ -1,5 +1,5 @@ package XML::RSS::Private::Output::Roles::ModulesElems; -$XML::RSS::Private::Output::Roles::ModulesElems::VERSION = '1.60'; +$XML::RSS::Private::Output::Roles::ModulesElems::VERSION = '1.61'; use strict; use warnings; @@ -17,7 +17,7 @@ =head1 VERSION -version 1.60 +version 1.61 =head1 AUTHOR diff -Nru libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/V0_91.pm libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/V0_91.pm --- libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/V0_91.pm 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/V0_91.pm 2019-08-24 08:54:12.000000000 +0000 @@ -1,25 +1,25 @@ package XML::RSS::Private::Output::V0_91; -$XML::RSS::Private::Output::V0_91::VERSION = '1.60'; +$XML::RSS::Private::Output::V0_91::VERSION = '1.61'; use strict; use warnings; use vars (qw(@ISA)); -use XML::RSS::Private::Output::Base; -use XML::RSS::Private::Output::Roles::ImageDims; +use XML::RSS::Private::Output::Base (); +use XML::RSS::Private::Output::Roles::ImageDims (); -@ISA = (qw( - XML::RSS::Private::Output::Roles::ImageDims - XML::RSS::Private::Output::Base - ) +@ISA = ( + qw( + XML::RSS::Private::Output::Roles::ImageDims + XML::RSS::Private::Output::Base + ) ); -sub _get_rdf_decl -{ +sub _get_rdf_decl { return - qq{\n\n} . - qq{\n\n}; + qq{\n\n} + . qq{\n\n}; } sub _calc_lastBuildDate { @@ -61,7 +61,7 @@ =head1 VERSION -version 1.60 +version 1.61 =head1 AUTHOR diff -Nru libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/V0_9.pm libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/V0_9.pm --- libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/V0_9.pm 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/V0_9.pm 2019-08-24 08:54:12.000000000 +0000 @@ -1,19 +1,17 @@ package XML::RSS::Private::Output::V0_9; -$XML::RSS::Private::Output::V0_9::VERSION = '1.60'; +$XML::RSS::Private::Output::V0_9::VERSION = '1.61'; use strict; use warnings; use vars (qw(@ISA)); -use XML::RSS::Private::Output::Base; +use XML::RSS::Private::Output::Base (); @ISA = (qw(XML::RSS::Private::Output::Base)); -sub _get_rdf_decl -{ - return - qq{\n\n}; +sub _get_rdf_decl { + return qq{\n\n}; } # 'description' for item does not exist in RSS 0.9 @@ -45,7 +43,7 @@ =head1 VERSION -version 1.60 +version 1.61 =head1 AUTHOR diff -Nru libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/V1_0.pm libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/V1_0.pm --- libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/V1_0.pm 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/V1_0.pm 2019-08-24 08:54:12.000000000 +0000 @@ -1,12 +1,12 @@ package XML::RSS::Private::Output::V1_0; -$XML::RSS::Private::Output::V1_0::VERSION = '1.60'; +$XML::RSS::Private::Output::V1_0::VERSION = '1.61'; use strict; use warnings; use vars (qw(@ISA)); -use XML::RSS::Private::Output::Base; -use XML::RSS::Private::Output::Roles::ModulesElems; +use XML::RSS::Private::Output::Base (); +use XML::RSS::Private::Output::Roles::ModulesElems (); @ISA = (qw(XML::RSS::Private::Output::Roles::ModulesElems XML::RSS::Private::Output::Base)); @@ -40,10 +40,8 @@ } sub _get_first_rdf_decl_mappings { - return ( - ["rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"], - [undef, "http://purl.org/rss/1.0/"] - ); + return (["rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"], + [undef, "http://purl.org/rss/1.0/"]); } sub _out_image_dc_elements { @@ -83,15 +81,11 @@ $self->_out_seq_items(); if ($self->_is_image_defined()) { - $self->_out('\n" - ); + $self->_out('\n"); } if (defined(my $textinput_link = $self->textinput('link'))) { - $self->_out('\n" - ); + $self->_out('\n"); } $self->_end_channel; @@ -111,7 +105,7 @@ =head1 VERSION -version 1.60 +version 1.61 =head1 AUTHOR diff -Nru libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/V2_0.pm libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/V2_0.pm --- libxml-rss-perl-1.60/lib/XML/RSS/Private/Output/V2_0.pm 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/lib/XML/RSS/Private/Output/V2_0.pm 2019-08-24 08:54:12.000000000 +0000 @@ -1,28 +1,26 @@ package XML::RSS::Private::Output::V2_0; -$XML::RSS::Private::Output::V2_0::VERSION = '1.60'; +$XML::RSS::Private::Output::V2_0::VERSION = '1.61'; use strict; use warnings; use vars (qw(@ISA)); -use XML::RSS::Private::Output::Base; -use XML::RSS::Private::Output::Roles::ModulesElems; -use XML::RSS::Private::Output::Roles::ImageDims; - -@ISA = (qw( - XML::RSS::Private::Output::Roles::ImageDims - XML::RSS::Private::Output::Roles::ModulesElems - XML::RSS::Private::Output::Base - ) +use XML::RSS::Private::Output::Base (); +use XML::RSS::Private::Output::Roles::ModulesElems (); +use XML::RSS::Private::Output::Roles::ImageDims (); + +@ISA = ( + qw( + XML::RSS::Private::Output::Roles::ImageDims + XML::RSS::Private::Output::Roles::ModulesElems + XML::RSS::Private::Output::Base + ) ); sub _get_filtered_items { my $self = shift; - return [ - grep {exists($_->{title}) || exists($_->{description})} - @{$self->_get_items()}, - ]; + return [grep { exists($_->{title}) || exists($_->{description}) } @{$self->_get_items()},]; } sub _out_item_2_0_tags { @@ -88,7 +86,7 @@ =head1 VERSION -version 1.60 +version 1.61 =head1 AUTHOR diff -Nru libxml-rss-perl-1.60/lib/XML/RSS.pm libxml-rss-perl-1.61/lib/XML/RSS.pm --- libxml-rss-perl-1.60/lib/XML/RSS.pm 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/lib/XML/RSS.pm 2019-08-24 08:54:12.000000000 +0000 @@ -1,16 +1,16 @@ package XML::RSS; -$XML::RSS::VERSION = '1.60'; +$XML::RSS::VERSION = '1.61'; use strict; use warnings; -use Carp; -use XML::Parser; +use Carp qw/ confess croak /; +use XML::Parser (); -use XML::RSS::Private::Output::Base; -use XML::RSS::Private::Output::V0_9; -use XML::RSS::Private::Output::V0_91; -use XML::RSS::Private::Output::V1_0; -use XML::RSS::Private::Output::V2_0; +use XML::RSS::Private::Output::Base (); +use XML::RSS::Private::Output::V0_9 (); +use XML::RSS::Private::Output::V0_91 (); +use XML::RSS::Private::Output::V1_0 (); +use XML::RSS::Private::Output::V2_0 (); use vars qw($VERSION $AUTOLOAD @ISA $AUTO_ADD); @@ -249,7 +249,7 @@ }; } -my %empty_ok_elements = (enclosure => 1); +my %empty_ok_elements = (enclosure => 1); my %hashref_ok_elements = (description => 1); sub _get_default_modules { @@ -271,23 +271,25 @@ } sub _get_dc_ok_fields { - return [qw( - contributor - coverage - creator - date - description - format - identifier - language - publisher - relation - rights - source - subject - title - type - )]; + return [ + qw( + contributor + coverage + creator + date + description + format + identifier + language + publisher + relation + rights + source + subject + title + type + ) + ]; } sub new { @@ -354,8 +356,7 @@ # namespaces $self->{namespaces} = {}; $self->{rss_namespace} = ''; - foreach my $k (@{$self->_get_init_default_key_assignments()}) - { + foreach my $k (@{$self->_get_init_default_key_assignments()}) { my $key = $k->{key}; $self->{$key} = exists($hash{$key}) ? $hash{$key} : $k->{default}; } @@ -441,41 +442,33 @@ sub _get_rendering_class { my ($self, $ver) = @_; - if ($ver eq "1.0") - { + if ($ver eq "1.0") { return "XML::RSS::Private::Output::V1_0"; } - elsif ($ver eq "0.9") - { + elsif ($ver eq "0.9") { return "XML::RSS::Private::Output::V0_9"; } - elsif ($ver eq "0.91") - { + elsif ($ver eq "0.91") { return "XML::RSS::Private::Output::V0_91"; } - else - { + else { return "XML::RSS::Private::Output::V2_0"; } } -sub _get_encode_cb_params -{ +sub _get_encode_cb_params { my $self = shift; - return - defined($self->{encode_cb}) ? - ("encode_cb" => $self->{encode_cb}) : - () - ; + return defined($self->{encode_cb}) + ? ("encode_cb" => $self->{encode_cb}) + : (); } sub _get_rendering_obj { my ($self, $ver) = @_; return $self->_get_rendering_class($ver)->new( - { - main => $self, + { main => $self, version => $ver, $self->_get_encode_cb_params(), } @@ -505,7 +498,6 @@ } - sub _get_output_methods_map { return { '0.9' => "as_rss_0_9", @@ -539,17 +531,15 @@ # of XML-RSS that had the channel/{link,description,title} as the empty # string by default. sub _output_env { - my $self = shift; + my $self = shift; my $callback = shift; - local $self->{channel}->{'link'} = $self->{channel}->{'link'}; + local $self->{channel}->{'link'} = $self->{channel}->{'link'}; local $self->{channel}->{'description'} = $self->{channel}->{'description'}; - local $self->{channel}->{'title'} = $self->{channel}->{'title'}; + local $self->{channel}->{'title'} = $self->{channel}->{'title'}; - foreach my $field (qw(link description title)) - { - if (!defined($self->{channel}->{$field})) - { + foreach my $field (qw(link description title)) { + if (!defined($self->{channel}->{$field})) { $self->{channel}->{$field} = ''; } } @@ -564,9 +554,7 @@ my $output_method = $self->_get_output_method($version); - return $self->_output_env( - sub { return $self->$output_method(); } - ); + return $self->_output_env(sub { return $self->$output_method(); }); } # Checks if inside a possibly namespaced element @@ -578,9 +566,7 @@ my $parser = $self->_parser; return $parser->within_element($elem) - || $parser->within_element( - $parser->generate_ns_name($elem, $self->{rss_namespace}) - ); + || $parser->within_element($parser->generate_ns_name($elem, $self->{rss_namespace})); } sub _get_elem_namespace_helper { @@ -618,29 +604,25 @@ sub _is_rdf_resource { my $self = shift; - my $el = shift; + my $el = shift; my $ns = shift; - if (!defined($ns)) - { + if (!defined($ns)) { $ns = $self->_parser->namespace($el); } - return ( - exists($self->_rdf_resource_fields->{ $ns }) - && exists($self->_rdf_resource_fields->{ $ns }{ $el }) - ); + return ( exists($self->_rdf_resource_fields->{$ns}) + && exists($self->_rdf_resource_fields->{$ns}{$el})); } sub _get_ns_arrayity { my ($self, $ns) = @_; - my $is_array = - $self->_parse_options()->{'modules_as_arrays'} - && (!exists($self->_get_default_modules()->{$ns})) - # RDF - && ($ns ne "http://www.w3.org/1999/02/22-rdf-syntax-ns#") - ; + my $is_array = $self->_parse_options()->{'modules_as_arrays'} + && (!exists($self->_get_default_modules()->{$ns})) + + # RDF + && ($ns ne "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); my $default_ref = sub { $is_array ? [] : {} }; @@ -659,8 +641,7 @@ $self->_append_struct( $struct, scalar($mapping_sub->($struct, $elem)), - scalar($is_array_sub->($struct, $elem)), - $cdata + scalar($is_array_sub->($struct, $elem)), $cdata ); } else { @@ -669,20 +650,14 @@ my ($is_array, $default_ref) = $self->_get_ns_arrayity($ns); $self->_append_struct( - ($struct->{$ns} ||= $default_ref->()), - $elem, - (defined($prefix) && $prefix eq "dc"), - $cdata + ($struct->{$ns} ||= $default_ref->()), $elem, + (defined($prefix) && $prefix eq "dc"), $cdata ); # If it's in a module namespace, provide a friendlier prefix duplicate if ($prefix) { - $self->_append_struct( - ($struct->{$prefix} ||= $default_ref->()), - $elem, - ($prefix eq "dc"), - $cdata - ); + $self->_append_struct(($struct->{$prefix} ||= $default_ref->()), + $elem, ($prefix eq "dc"), $cdata); } } @@ -726,12 +701,8 @@ sub _append_text_to_elem { my ($self, $ext_tag, $cdata) = @_; - return $self->_append_text_to_elem_struct( - $self->$ext_tag(), - $cdata, - \&_return_elem, - \&_return_elem_is_array, - ); + return $self->_append_text_to_elem_struct($self->$ext_tag(), + $cdata, \&_return_elem, \&_return_elem_is_array,); } sub _within_topics { @@ -740,10 +711,7 @@ my $parser = $self->_parser; return $parser->within_element( - $parser->generate_ns_name( - "topics", 'http://purl.org/rss/1.0/modules/taxonomy/' - ) - ); + $parser->generate_ns_name("topics", 'http://purl.org/rss/1.0/modules/taxonomy/')); } sub _return_item_elem { @@ -769,19 +737,14 @@ push @{$self->{items}}, {}; } - $self->_append_text_to_elem_struct( - $self->_last_item, - $cdata, - \&_return_item_elem, - \&_return_item_elem_is_array - ); + $self->_append_text_to_elem_struct($self->_last_item, + $cdata, \&_return_item_elem, \&_return_item_elem_is_array); } sub _append_to_array_elem { my ($self, $category, $cdata) = @_; - if (! $self->_my_in_element($category)) - { + if (!$self->_my_in_element($category)) { return; } @@ -804,26 +767,29 @@ if ($self->_my_in_element("image")) { $self->_append_text_to_elem("image", $cdata); } + # item element elsif (defined($self->{_inside_item_elem})) { return if $self->_within_topics; $self->_append_text_to_item($cdata); } + # textinput element - elsif ( - $self->_my_in_element("textinput") || $self->_my_in_element("textInput") - ) - { + elsif ($self->_my_in_element("textinput") || $self->_my_in_element("textInput")) { $self->_append_text_to_elem("textinput", $cdata); } + # skipHours element elsif ($self->_append_to_array_elem("skipHours", $cdata)) { + # Do nothing - already done in the predicate. } elsif ($self->_append_to_array_elem("skipDays", $cdata)) { + # Do nothing - already done in the predicate. } + # channel element elsif ($self->_my_in_element("channel")) { if ($self->_within_topics() || $self->_my_in_element("items")) { @@ -849,12 +815,9 @@ sub _should_be_hashref { my ($self, $el) = @_; - return - ( - $empty_ok_elements{$el} - || ($self->_parse_options()->{'hashrefs_instead_of_strings'} - && $hashref_ok_elements{$el} - ) + return ( + $empty_ok_elements{$el} || ($self->_parse_options()->{'hashrefs_instead_of_strings'} + && $hashref_ok_elements{$el}) ); } @@ -865,32 +828,34 @@ my ($is_array, $default_ref) = $self->_get_ns_arrayity($el_ns); - my @structs = (!$el_verdict) - ? ( - (exists($self->{modules}->{$el_ns}) - ? ($input_struct->{$self->{modules}->{$el_ns}} ||= $default_ref->()) - : () - ), - ($input_struct->{$el_ns} ||= $default_ref->()), - ) - : ($input_struct) - ; + my @structs = + (!$el_verdict) + ? ( + ( exists($self->{modules}->{$el_ns}) + ? ($input_struct->{$self->{modules}->{$el_ns}} ||= $default_ref->()) + : () + ), + ($input_struct->{$el_ns} ||= $default_ref->()), + ) + : ($input_struct); - foreach my $struct (@structs) - { + foreach my $struct (@structs) { if (ref($struct) eq 'ARRAY') { - push @$struct, { el => $el, val => "", }; + push @$struct, {el => $el, val => "",}; } + # If it's an array - append a new empty element because a new one # was started. elsif (ref($struct->{$el}) eq "ARRAY") { push @{$struct->{$el}}, ""; } + # If it's not an array but still full (i.e: it's only the second # element), then turn it into an array elsif (defined($struct->{$el}) && length($struct->{$el})) { $struct->{$el} = [$struct->{$el}, ""]; } + # Else - do nothing and let the function append to the new value # } @@ -923,10 +888,8 @@ my ($el_ns, $el_verdict) = $self->_get_elem_namespace($el); - if ($el eq "image") - { - if (exists($attribs{'resource'})) - { + if ($el eq "image") { + if (exists($attribs{'resource'})) { $self->image("rdf:resource", $attribs{'resource'}); } } @@ -943,7 +906,7 @@ # handle xml:base $self->{'xml:base'} = $attribs{'base'} if exists $attribs{'base'}; - # beginning of RSS 1.0 or RSS 0.9 + # beginning of RSS 1.0 or RSS 0.9 } elsif ($el eq 'RDF') { my @prefixes = $parser->new_ns_prefixes; @@ -985,12 +948,14 @@ # handle xml:base $self->{'xml:base'} = $attribs{'base'} if exists $attribs{'base'}; - # beginning of item element + # beginning of item element } elsif ($self->_start_array_element("skipHours", $el)) { + # Do nothing - already done in the predicate. } elsif ($self->_start_array_element("skipDays", $el)) { + # Do nothing - already done in the predicate. } elsif ($el eq 'cloud') { @@ -1015,6 +980,7 @@ $self->{_inside_item_elem} = $parser->depth(); } } + # handle xml:base $self->_last_item->{'xml:base'} = $attribs{'base'} if exists $attribs{'base'}; @@ -1023,20 +989,19 @@ } elsif ($el eq 'guid') { $self->_last_item->{'isPermaLink'} = - ( (!exists($attribs{'isPermaLink'})) || (lc($attribs{'isPermaLink'}) ne 'false') ); + ((!exists($attribs{'isPermaLink'})) || (lc($attribs{'isPermaLink'}) ne 'false')); # beginning of taxo li element in item element #'http://purl.org/rss/1.0/modules/taxonomy/' => 'taxo' } elsif ( - $self->_current_element eq "item" - && (($el eq "category") || - ( - exists($self->{modules}->{$el_ns}) - && ($self->{modules}->{$el_ns} eq "dc") - ) + $self->_current_element eq "item" + && (($el eq "category") + || (exists($self->{modules}->{$el_ns}) + && ($self->{modules}->{$el_ns} eq "dc")) ) - ) { + ) + { $self->_start_array_element_in_struct($self->_last_item, $el); } elsif ( @@ -1045,7 +1010,7 @@ ) && $parser->within_element($parser->generate_ns_name("item", $namespace_map->{'rss10'})) && $self->_current_element eq 'Bag' - && $el eq 'li' + && $el eq 'li' ) { @@ -1061,7 +1026,7 @@ ) && $parser->within_element($parser->generate_ns_name("channel", $namespace_map->{'rss10'})) && $self->_current_element eq 'Bag' - && $el eq 'li' + && $el eq 'li' ) { push(@{$self->{'channel'}->{'taxo'}}, $attribs{'resource'}); @@ -1069,7 +1034,7 @@ } # beginning of a channel element that stores its info in rdf:resource - elsif ( $parser->namespace($el) + elsif ($parser->namespace($el) && $self->_is_rdf_resource($el) && $self->_current_element eq 'channel') { @@ -1094,8 +1059,9 @@ } } } + # beginning of an item element that stores its info in rdf:resource - elsif ( $parser->namespace($el) + elsif ($parser->namespace($el) && $self->_is_rdf_resource($el) && $self->_current_element eq 'item') { @@ -1142,19 +1108,21 @@ } } elsif ($self->_start_array_element("image", $el)) { + # Do nothing - already done in the predicate. } - elsif (($el eq "category") && - (!$parser->within_element("item")) && - $self->_start_array_element("channel", $el)) { + elsif (($el eq "category") + && (!$parser->within_element("item")) + && $self->_start_array_element("channel", $el)) + { # Do nothing - already done in the predicate. } - elsif (($self->_current_element eq 'channel') && - ($el_verdict)) - { + elsif (($self->_current_element eq 'channel') + && ($el_verdict)) + { # Make sure an opening tag signifies that the element has been # encountered. - if ( exists($self->{'channel'}->{$el}) + if (exists($self->{'channel'}->{$el}) && (!defined($self->{'channel'}->{$el}))) { $self->{'channel'}->{$el} = ""; @@ -1169,12 +1137,13 @@ my $new = shift; if (!$self->_allow_multiple($el)) { - return $new; + return $new; } if (!defined $old) { $old = []; - } elsif (ref($old) ne 'ARRAY') { + } + elsif (ref($old) ne 'ARRAY') { $old = [$old]; } push @$old, $new; @@ -1185,11 +1154,7 @@ my $self = shift; my $el = shift; - $self->{_allow_multiple} ||= - { - map { $_ => 1 } - @{$self->_parse_options->{allow_multiple} || []} - }; + $self->{_allow_multiple} ||= {map { $_ => 1 } @{$self->_parse_options->{allow_multiple} || []}}; return $self->{_allow_multiple}->{$el}; } @@ -1237,10 +1202,11 @@ NoExpand => 1, ParseParamEnt => 0, Handlers => { - Char => sub { + Char => sub { my ($parser, $cdata) = @_; $self->_parser($parser); $self->_handle_char($cdata); + # Detach the parser to avoid reference loops. $self->_parser(undef); }, @@ -1248,20 +1214,23 @@ my $parser = shift; $self->_parser($parser); $self->_handle_dec(@_); + # Detach the parser to avoid reference loops. $self->_parser(undef); }, - Start => sub { + Start => sub { my $parser = shift; $self->_parser($parser); $self->_handle_start(@_); + # Detach the parser to avoid reference loops. $self->_parser(undef); }, - End => sub { + End => sub { my $parser = shift; $self->_parser($parser); $self->_handle_end(@_); + # Detach the parser to avoid reference loops. $self->_parser(undef); }, @@ -1282,12 +1251,12 @@ return $self->{_parse_options}; } -sub _empty {} +sub _empty { } sub _generic_parse { - my $self = shift; - my $method = shift; - my $arg = shift; + my $self = shift; + my $method = shift; + my $arg = shift; my $options = shift; $self->_reset; @@ -1303,18 +1272,13 @@ { my $parser = $self->_get_parser(); - eval { - $parser->$method($arg); - }; + eval { $parser->$method($arg); }; - if ($@) - { + if ($@) { my $err = $@; # Cleanup so perl-5.6.2 will be happy. - $parser->setHandlers( - map { ($_ => \&_empty) } (qw(Char XMLDecl Start End)) - ); + $parser->setHandlers(map { ($_ => \&_empty) } (qw(Char XMLDecl Start End))); $self->_parser(0); undef($parser); @@ -1330,17 +1294,17 @@ } sub parse { - my $self = shift; + my $self = shift; my $text_to_parse = shift; - my $options = shift; + my $options = shift; return $self->_generic_parse("parse", $text_to_parse, $options); } sub parsefile { - my $self = shift; + my $self = shift; my $file_to_parse = shift; - my $options = shift; + my $options = shift; return $self->_generic_parse("parsefile", $file_to_parse, $options); } @@ -1434,7 +1398,7 @@ sub _modules { my $self = shift; - return $self->_handle_accessor("modules", @_);; + return $self->_handle_accessor("modules", @_); } sub channel { @@ -1505,7 +1469,7 @@ =head1 VERSION -version 1.60 +version 1.61 =head1 SYNOPSIS @@ -1682,15 +1646,16 @@ This module provides a basic framework for creating and maintaining RDF Site Summary (RSS) files. This distribution also contains many examples that allow you to generate HTML from an RSS, convert between -0.9, 0.91, and 1.0 version, and other nifty things. +0.9, 0.91, 1.0, and 2.0 version, and other nifty things. This might be helpful if you want to include news feeds on your Web site from sources like Slashdot and Freshmeat or if you want to syndicate your own content. -XML::RSS currently supports 0.9, 0.91, and 1.0 versions of RSS. -See http://backend.userland.com/rss091 for information on RSS 0.91. -See http://www.purplepages.ie/RSS/netscape/rss0.90.html for RSS 0.9. -See http://web.resource.org/rss/1.0/ for RSS 1.0. +XML::RSS currently supports versions +L<0.9|http://www.rssboard.org/rss-0-9-0>, +L<0.91|http://www.rssboard.org/rss-0-9-1>, +L<1.0|http://web.resource.org/rss/1.0/>, and +L<2.0|http://www.rssboard.org/rss-2-0> of RSS. RSS was originally developed by Netscape as the format for Netscape Netcenter channels, however, many Web sites have since @@ -1701,11 +1666,19 @@ B In order to parse and generate dates (such as C and C) it is recommended to use L and L , which is what L uses internally -and requires. +and requires. It should also be possible to pass L objects +which will be formatted accordingly. E.g: -=head1 VERSION + use DateTime (); -version 1.60 + my $dt = DateTime->from_epoch(epoch => 1_500_000_000); + + $rss->channel( + pubDate => $dt, + . + . + . + ); =head1 METHODS diff -Nru libxml-rss-perl-1.60/Makefile.PL libxml-rss-perl-1.61/Makefile.PL --- libxml-rss-perl-1.60/Makefile.PL 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/Makefile.PL 2019-08-24 08:54:12.000000000 +0000 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.011. +# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.012. use strict; use warnings; @@ -39,7 +39,7 @@ "Test::More" => "0.88", "constant" => 0 }, - "VERSION" => "1.60", + "VERSION" => "1.61", "test" => { "TESTS" => "t/*.t" } diff -Nru libxml-rss-perl-1.60/MANIFEST libxml-rss-perl-1.61/MANIFEST --- libxml-rss-perl-1.60/MANIFEST 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/MANIFEST 2019-08-24 08:54:12.000000000 +0000 @@ -1,4 +1,4 @@ -# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.011. +# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.012. Build.PL Changes LICENSE diff -Nru libxml-rss-perl-1.60/META.json libxml-rss-perl-1.61/META.json --- libxml-rss-perl-1.60/META.json 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/META.json 2019-08-24 08:54:12.000000000 +0000 @@ -4,7 +4,7 @@ "Shlomi Fish " ], "dynamic_config" : 0, - "generated_by" : "Dist::Zilla version 6.011, CPAN::Meta::Converter version 2.150010", + "generated_by" : "Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010", "keywords" : [ "feed", "feeds", @@ -78,35 +78,35 @@ "provides" : { "XML::RSS" : { "file" : "lib/XML/RSS.pm", - "version" : "1.60" + "version" : "1.61" }, "XML::RSS::Private::Output::Base" : { "file" : "lib/XML/RSS/Private/Output/Base.pm", - "version" : "1.60" + "version" : "1.61" }, "XML::RSS::Private::Output::Roles::ImageDims" : { "file" : "lib/XML/RSS/Private/Output/Roles/ImageDims.pm", - "version" : "1.60" + "version" : "1.61" }, "XML::RSS::Private::Output::Roles::ModulesElems" : { "file" : "lib/XML/RSS/Private/Output/Roles/ModulesElems.pm", - "version" : "1.60" + "version" : "1.61" }, "XML::RSS::Private::Output::V0_9" : { "file" : "lib/XML/RSS/Private/Output/V0_9.pm", - "version" : "1.60" + "version" : "1.61" }, "XML::RSS::Private::Output::V0_91" : { "file" : "lib/XML/RSS/Private/Output/V0_91.pm", - "version" : "1.60" + "version" : "1.61" }, "XML::RSS::Private::Output::V1_0" : { "file" : "lib/XML/RSS/Private/Output/V1_0.pm", - "version" : "1.60" + "version" : "1.61" }, "XML::RSS::Private::Output::V2_0" : { "file" : "lib/XML/RSS/Private/Output/V2_0.pm", - "version" : "1.60" + "version" : "1.61" } }, "release_status" : "stable", @@ -121,10 +121,10 @@ "web" : "https://github.com/shlomif/perl-XML-RSS" } }, - "version" : "1.60", + "version" : "1.61", "x_Dist_Zilla" : { "perl" : { - "version" : "5.026001" + "version" : "5.028002" }, "plugins" : [ { @@ -136,17 +136,17 @@ } }, "name" : "@Filter/TestMoreDoneTesting", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::AutoPrereqs", "name" : "@Filter/AutoPrereqs", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ExecDir", "name" : "@Filter/ExecDir", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::GatherDir", @@ -162,22 +162,22 @@ } }, "name" : "@Filter/GatherDir", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ManifestSkip", "name" : "@Filter/ManifestSkip", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaYAML", "name" : "@Filter/MetaYAML", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PruneCruft", "name" : "@Filter/PruneCruft", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::RunExtraTests", @@ -192,7 +192,7 @@ { "class" : "Dist::Zilla::Plugin::ShareDir", "name" : "@Filter/ShareDir", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MakeMaker", @@ -202,7 +202,7 @@ } }, "name" : "@Filter/MakeMaker", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", @@ -212,22 +212,22 @@ { "class" : "Dist::Zilla::Plugin::ConfirmRelease", "name" : "@Filter/ConfirmRelease", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Manifest", "name" : "@Filter/Manifest", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaConfig", "name" : "@Filter/MetaConfig", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaJSON", "name" : "@Filter/MetaJSON", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::MetaProvides::Package", @@ -237,7 +237,7 @@ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM", - "version" : "6.011" + "version" : "6.012" } ], "include_underscores" : 0 @@ -250,7 +250,7 @@ }, "Dist::Zilla::Role::ModuleMetadata" : { "Module::Metadata" : "1.000033", - "version" : "0.004" + "version" : "0.006" } }, "name" : "@Filter/MetaProvides::Package", @@ -259,7 +259,7 @@ { "class" : "Dist::Zilla::Plugin::MetaResources", "name" : "@Filter/MetaResources", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::ModuleBuild", @@ -269,27 +269,22 @@ } }, "name" : "@Filter/ModuleBuild", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PkgVersion", "name" : "@Filter/PkgVersion", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PodCoverageTests", "name" : "@Filter/PodCoverageTests", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PodSyntaxTests", "name" : "@Filter/PodSyntaxTests", - "version" : "6.011" - }, - { - "class" : "Dist::Zilla::Plugin::PodVersion", - "name" : "@Filter/PodVersion", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Test::Compile", @@ -363,7 +358,7 @@ { "class" : "Dist::Zilla::Plugin::TestRelease", "name" : "@Filter/TestRelease", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::PodWeaver", @@ -452,7 +447,7 @@ { "class" : "Pod::Weaver::Section::Support", "name" : "Support", - "version" : "1.008" + "version" : "1.010" } ] } @@ -463,7 +458,7 @@ { "class" : "Dist::Zilla::Plugin::UploadToCPAN", "name" : "@Filter/UploadToCPAN", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::Keywords", @@ -490,57 +485,57 @@ { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":InstallModules", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":IncModules", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":TestFiles", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExtraTestFiles", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ExecFiles", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":PerlExecFiles", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":ShareFiles", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":MainModule", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":AllFiles", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : ":NoFiles", - "version" : "6.011" + "version" : "6.012" }, { "class" : "Dist::Zilla::Plugin::FinderCode", "name" : "@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM", - "version" : "6.011" + "version" : "6.012" } ], "zilla" : { @@ -548,9 +543,10 @@ "config" : { "is_trial" : 0 }, - "version" : "6.011" + "version" : "6.012" } }, - "x_serialization_backend" : "Cpanel::JSON::XS version 4.02" + "x_generated_by_perl" : "v5.28.2", + "x_serialization_backend" : "Cpanel::JSON::XS version 4.12" } diff -Nru libxml-rss-perl-1.60/META.yml libxml-rss-perl-1.61/META.yml --- libxml-rss-perl-1.60/META.yml 2018-03-04 21:14:39.000000000 +0000 +++ libxml-rss-perl-1.61/META.yml 2019-08-24 08:54:12.000000000 +0000 @@ -15,7 +15,7 @@ ExtUtils::MakeMaker: '0' Module::Build: '0.28' dynamic_config: 0 -generated_by: 'Dist::Zilla version 6.011, CPAN::Meta::Converter version 2.150010' +generated_by: 'Dist::Zilla version 6.012, CPAN::Meta::Converter version 2.150010' keywords: - feed - feeds @@ -36,28 +36,28 @@ provides: XML::RSS: file: lib/XML/RSS.pm - version: '1.60' + version: '1.61' XML::RSS::Private::Output::Base: file: lib/XML/RSS/Private/Output/Base.pm - version: '1.60' + version: '1.61' XML::RSS::Private::Output::Roles::ImageDims: file: lib/XML/RSS/Private/Output/Roles/ImageDims.pm - version: '1.60' + version: '1.61' XML::RSS::Private::Output::Roles::ModulesElems: file: lib/XML/RSS/Private/Output/Roles/ModulesElems.pm - version: '1.60' + version: '1.61' XML::RSS::Private::Output::V0_9: file: lib/XML/RSS/Private/Output/V0_9.pm - version: '1.60' + version: '1.61' XML::RSS::Private::Output::V0_91: file: lib/XML/RSS/Private/Output/V0_91.pm - version: '1.60' + version: '1.61' XML::RSS::Private::Output::V1_0: file: lib/XML/RSS/Private/Output/V1_0.pm - version: '1.60' + version: '1.61' XML::RSS::Private::Output::V2_0: file: lib/XML/RSS/Private/Output/V2_0.pm - version: '1.60' + version: '1.61' requires: Carp: '0' DateTime::Format::Mail: '0' @@ -72,10 +72,10 @@ bugtracker: https://github.com/shlomif/perl-XML-RSS/issues homepage: http://metacpan.org/release/XML-RSS repository: git://github.com/shlomif/perl-XML-RSS.git -version: '1.60' +version: '1.61' x_Dist_Zilla: perl: - version: '5.026001' + version: '5.028002' plugins: - class: Dist::Zilla::Plugin::Prereqs @@ -84,15 +84,15 @@ phase: test type: requires name: '@Filter/TestMoreDoneTesting' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::AutoPrereqs name: '@Filter/AutoPrereqs' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::ExecDir name: '@Filter/ExecDir' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::GatherDir config: @@ -105,19 +105,19 @@ prune_directory: [] root: . name: '@Filter/GatherDir' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::ManifestSkip name: '@Filter/ManifestSkip' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::MetaYAML name: '@Filter/MetaYAML' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::PruneCruft name: '@Filter/PruneCruft' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::RunExtraTests config: @@ -128,14 +128,14 @@ - class: Dist::Zilla::Plugin::ShareDir name: '@Filter/ShareDir' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::MakeMaker config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Filter/MakeMaker' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::CheckChangesHasContent name: '@Filter/CheckChangesHasContent' @@ -143,19 +143,19 @@ - class: Dist::Zilla::Plugin::ConfirmRelease name: '@Filter/ConfirmRelease' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::Manifest name: '@Filter/Manifest' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::MetaConfig name: '@Filter/MetaConfig' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::MetaJSON name: '@Filter/MetaJSON' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::MetaProvides::Package config: @@ -164,7 +164,7 @@ - class: Dist::Zilla::Plugin::FinderCode name: '@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM' - version: '6.011' + version: '6.012' include_underscores: 0 Dist::Zilla::Role::MetaProvider::Provider: $Dist::Zilla::Role::MetaProvider::Provider::VERSION: '2.002004' @@ -173,36 +173,32 @@ meta_noindex: '1' Dist::Zilla::Role::ModuleMetadata: Module::Metadata: '1.000033' - version: '0.004' + version: '0.006' name: '@Filter/MetaProvides::Package' version: '2.004003' - class: Dist::Zilla::Plugin::MetaResources name: '@Filter/MetaResources' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::ModuleBuild config: Dist::Zilla::Role::TestRunner: default_jobs: 1 name: '@Filter/ModuleBuild' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::PkgVersion name: '@Filter/PkgVersion' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::PodCoverageTests name: '@Filter/PodCoverageTests' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::PodSyntaxTests name: '@Filter/PodSyntaxTests' - version: '6.011' - - - class: Dist::Zilla::Plugin::PodVersion - name: '@Filter/PodVersion' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::Test::Compile config: @@ -258,7 +254,7 @@ - class: Dist::Zilla::Plugin::TestRelease name: '@Filter/TestRelease' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::PodWeaver config: @@ -330,13 +326,13 @@ - class: Pod::Weaver::Section::Support name: Support - version: '1.008' + version: '1.010' name: '@Filter/PodWeaver' version: '4.008' - class: Dist::Zilla::Plugin::UploadToCPAN name: '@Filter/UploadToCPAN' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::Keywords config: @@ -358,50 +354,51 @@ - class: Dist::Zilla::Plugin::FinderCode name: ':InstallModules' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':IncModules' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':TestFiles' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExtraTestFiles' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ExecFiles' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':PerlExecFiles' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':ShareFiles' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':MainModule' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':AllFiles' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: ':NoFiles' - version: '6.011' + version: '6.012' - class: Dist::Zilla::Plugin::FinderCode name: '@Filter/MetaProvides::Package/AUTOVIV/:InstallModulesPM' - version: '6.011' + version: '6.012' zilla: class: Dist::Zilla::Dist::Builder config: is_trial: '0' - version: '6.011' + version: '6.012' +x_generated_by_perl: v5.28.2 x_serialization_backend: 'YAML::Tiny version 1.73'