use File::Basename qw/fileparse/;
use Fcntl qw/O_RDWR O_CREAT/;
use Getopt::Long;
-use JSON;
+use JSON::MaybeXS;
use Storable qw/thaw freeze/;
##################################################
push @files, \%entry
}
- my $json = JSON->new->utf8->canonical->encode({files => \@files, prefix => $prefix});
+ my $json = JSON::MaybeXS->new(canonical => 1)->encode({files => \@files, prefix => $prefix});
$json =~ s/</</g;
$json =~ s/>/>/g;
$ht->param(files=>[sort { $a->{title} cmp $b->{title} } @files], prefix => $prefix, json => $json);