load HTML::Entities at top
Used in several subs, not all of which load it on demand, this seems simpler.master
parent
bc2671082b
commit
16299dbae8
|
@ -7,6 +7,7 @@ use strict;
|
||||||
use IkiWiki 2.00;
|
use IkiWiki 2.00;
|
||||||
use HTML::Parser;
|
use HTML::Parser;
|
||||||
use HTML::Tagset;
|
use HTML::Tagset;
|
||||||
|
use HTML::Entities;
|
||||||
use URI;
|
use URI;
|
||||||
use open qw{:utf8 :std};
|
use open qw{:utf8 :std};
|
||||||
|
|
||||||
|
@ -205,8 +206,6 @@ sub loadstate () { #{{{
|
||||||
sub savestate () { #{{{
|
sub savestate () { #{{{
|
||||||
return unless $state_loaded;
|
return unless $state_loaded;
|
||||||
garbage_collect();
|
garbage_collect();
|
||||||
eval q{use HTML::Entities};
|
|
||||||
error($@) if $@;
|
|
||||||
my $newfile="$config{wikistatedir}/aggregate.new";
|
my $newfile="$config{wikistatedir}/aggregate.new";
|
||||||
my $cleanup = sub { unlink($newfile) };
|
my $cleanup = sub { unlink($newfile) };
|
||||||
open (OUT, ">$newfile") || error("open $newfile: $!", $cleanup);
|
open (OUT, ">$newfile") || error("open $newfile: $!", $cleanup);
|
||||||
|
@ -335,8 +334,6 @@ sub aggregate (@) { #{{{
|
||||||
error($@) if $@;
|
error($@) if $@;
|
||||||
eval q{use URI::Fetch};
|
eval q{use URI::Fetch};
|
||||||
error($@) if $@;
|
error($@) if $@;
|
||||||
eval q{use HTML::Entities};
|
|
||||||
error($@) if $@;
|
|
||||||
|
|
||||||
foreach my $feed (@_) {
|
foreach my $feed (@_) {
|
||||||
$feed->{lastupdate}=time;
|
$feed->{lastupdate}=time;
|
||||||
|
|
Loading…
Reference in New Issue