projects
/
app-musicexpo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch to JSON::MaybeXS
[app-musicexpo.git]
/
lib
/
App
/
MusicExpo.pm
diff --git
a/lib/App/MusicExpo.pm
b/lib/App/MusicExpo.pm
index 242e0df0cd19d66cba78cc883ad27b3c965edfb6..ef99911562494db12f098cdc34bd9016ce0d12bd 100644
(file)
--- a/
lib/App/MusicExpo.pm
+++ b/
lib/App/MusicExpo.pm
@@
-15,7
+15,7
@@
use DB_File qw//;
use File::Basename qw/fileparse/;
use Fcntl qw/O_RDWR O_CREAT/;
use Getopt::Long;
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/;
##################################################
use Storable qw/thaw freeze/;
##################################################
@@
-129,7
+129,7
@@
sub run {
push @files, \%entry
}
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);
$json =~ s/</</g;
$json =~ s/>/>/g;
$ht->param(files=>[sort { $a->{title} cmp $b->{title} } @files], prefix => $prefix, json => $json);
This page took
0.010354 seconds
and
4
git commands to generate.