X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/bc2671082bd69fd10091c4598f2002a672a4296d..b2dea99417ebfee3d448ab6b49ca58cb2780258d:/IkiWiki/Plugin/aggregate.pm diff --git a/IkiWiki/Plugin/aggregate.pm b/IkiWiki/Plugin/aggregate.pm index 3ec067cc1..cb165acd2 100644 --- a/IkiWiki/Plugin/aggregate.pm +++ b/IkiWiki/Plugin/aggregate.pm @@ -7,6 +7,7 @@ use strict; use IkiWiki 2.00; use HTML::Parser; use HTML::Tagset; +use HTML::Entities; use URI; use open qw{:utf8 :std}; @@ -205,8 +206,6 @@ sub loadstate () { #{{{ sub savestate () { #{{{ return unless $state_loaded; garbage_collect(); - eval q{use HTML::Entities}; - error($@) if $@; my $newfile="$config{wikistatedir}/aggregate.new"; my $cleanup = sub { unlink($newfile) }; open (OUT, ">$newfile") || error("open $newfile: $!", $cleanup); @@ -335,8 +334,6 @@ sub aggregate (@) { #{{{ error($@) if $@; eval q{use URI::Fetch}; error($@) if $@; - eval q{use HTML::Entities}; - error($@) if $@; foreach my $feed (@_) { $feed->{lastupdate}=time; @@ -407,7 +404,7 @@ sub aggregate (@) { #{{{ title => defined $entry->title ? decode_entities($entry->title) : "untitled", link => $entry->link, content => defined $entry->content->body ? $entry->content->body : "", - guid => defined $entry->id ? $entry->id : time."_".$feed->name, + guid => defined $entry->id ? $entry->id : time."_".$feed->{name}, ctime => $entry->issued ? ($entry->issued->epoch || time) : time, ); }